Re: Loading a jpeg.
"Anthony Wood" <[email protected]>
| Newsgroups | gmane.comp.hardware.roku.technical |
|---|---|
| Message-ID | <001d01c44ea8$d39f20f0$0900a8c0@SpaceInvaders> |
It may turn out easier to save the file to /tmp , which is a RAM disk, and then use either photo ECP commands to display the picture, or use a command line jpeg displayer (source attached). Then delete the ram disk file, once complete. The attached example shows how to use the jpeg decoder. However, it uses the video scaler, which may be more complicated than you want. If you don't need to scale the images, you can also display jpegs into a regular window, which is more straight forward. unfortuanly, as far as I know, I don't think you can use the JpegFile class on an in memory structure, which it probably should do (take a Stream class instead of a file name, for example). ----- Original Message ----- From: "Michael Artemiw" <[email protected]> To: <[email protected]> Sent: Wednesday, June 09, 2004 11:19 AM Subject: [Roku-tech] Loading a jpeg. > I am trying to load a jpeg from a file and am running into some problems. > > I have tried the following code > > CascadeFile cf("/mnt/smb/xpc/dwspictures/u19p.jpeg"); > cout << cf.Open("r"); > CascadeBitmap cb; > cout << cb.CreateFromBitmapFile(cf); > cout.flush(); > > This spits out 10 which seems to indicate there is no problem opening the file > but that it cannot load the jpeg. > > I tried making use of CascadeJpegFile but its header is not included with > Cascade.h. When I add the appropriate include statement I get compile > errors with jpeglib.h > > "typespecifier omitted for parameter", and > "parse error before '*'" > > On lines 911 and 912. > > Are we not supposed to use CascadeJpegFile yet? Is there any way to find > out what is going wrong in CreateFromBitmap? > > Thanks, > Michael Artemiw > DashWorks Studios > www.dashworksstudios.com > 416.259.7723 > > _______________________________________________ > Roku-tech mailing list > [email protected] > http://lists.rokulabs.com/mailman/listinfo/roku-tech > _______________________________________________ Roku-tech mailing list [email protected] http://lists.rokulabs.com/mailman/listinfo/roku-tech
showjpeg.cpp
(application/octet-stream, 12.3 KB) - not displayed