> I am learning FLTK, and I'm trying to create a GUI.
> I manage to insert a picture on my interface, but I'm not 
> able to resize the picture (JPEG picture) in my window.
> Here is the code I developped :
> *-----------------------------------------------------------
>   fl_register_images();
>   Fl_JPEG_Image *Tool_FSW = new 
> Fl_JPEG_Image("/disk3/home/lefebvre/MorfeoGUI/Tool.jpeg");
>   Fl_Box *Tool_FSW_Box = new Fl_Box(2 * WB, voffset + 3*WB, 
> 27 * WB, 20 * WB);
>   Tool_FSW_Box->box(FL_UP_BOX);
>   Tool_FSW_Box->image(Tool_FSW);
> *-----------------------------------------------------------
> 
> Do you have some idea about how resizing a picture ?

Look at the pixmap_browser demo in the test folder. See how it uses
img->copy(...) to resize the image. 
That is the easiest way, although the resizing method used is not the
most advanced, so may give less than ideal results at very large or very
small scales.

If you need better scaling, you probably would need to use some more
sophisticated image processing techniques to scale the image.





SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to