On 30 Dec 2012, at 12:19, Furqan wrote:

> Thanks.
> I think its complicated to use one jpeg with all other libs.

No, it is not, it is usually easier than using the built-in jpeg libs.

Indeed, on most platforms other than Windows, the system already provides a 
libjpeg and most (all?) other libs just use that rather than trying to provide 
their own.

With fltk it is pretty easy to tell it to use a system-provided libjpeg when 
you build the fltk libs, and I'd *assume* that other libs are similar.


> 
> Please tell me how can I make data for Fl_Shared_Image.
> what I need is something like this.
> 
> 1) unsigned char* imgdata1 = new unsigned char[Oimg1->width*Oimg1->height*3];
> 
> 2) GetImageDataFromOpenCV(Oimg1, imgdata1);
> 
> 3) Fl_Shared_Image *sImgs = (Fl_Shared_Image *)(imgdata1);
> 
> No. 3) could be like sImgs.set(imgdata1)
> 
> I read your suggested link but, there I couldn't find a way in order to set 
> array of image data into Fl_Shared_Image.
> 
> How can I achieve this?
> thanks.

I don't know what you are doing in your code, but it doesn't sound, on the face 
of it, as if Fl_Shared_Image is the correct widget for your use here...

You maybe want a Fl_RGB_Image, or maybe even a basic Fl_Image...?

Or perhaps derive your own widget that has the desired behaviour? That's at 
least partly shown in the example referred to.

In any case, note that Fl_Shared_Image does "contain" an Fl_Image, so you can 
derive your own widget from Fl_Shared_Image and then manipulate the internal 
data() member of the Fl_Image to adjust the data.

Though, as I said before, I suspect that Fl_RGB_Image may be more helpful here.



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

Reply via email to