You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-d...@googlegroups.com
hi, i have set up skia on android (api 15). I am trying to decode a jpg image using the following code: SkBitmap bitmap; SkStream* stream = new SkFILEStream("testfile.jpg"); bool x = SkImageDecoder::DecodeFile("testfile.jpg", &bitmap);
however, skia is unable to decode the file and returns false for x. the same code works while decoding png or bmp files. Is this a known bug for skia in android? is there any workaroudn for this issue? Regards, Swagat Mishra
Message has been deleted
Robert Phillips
unread,
Aug 7, 2012, 10:46:50 AM8/7/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-d...@googlegroups.com
Hi There,
Have you tried adding a call to force linking of the jpeg codec? The
cmykjpeg.cpp file has an example of how this is done. PNGs are handled
special by Android by defining the SK_ENABLE_LIBPNG in
SkImageDecoderFactory.cpp.
Rob
On Sat, Aug 4, 2012 at 1:17 PM, swagat mishra
<swagatmi...@gmail.com> wrote:
> waiting for replies on this...please help
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-d...@googlegroups.com
Hi,
I did the force linking and while debugging find that the right codec is being used and am able to step in to SkImageDecoder_libjpeg.cpp.
However , i am still unable to get a decoded jpeg.
Does this mean its a problem in libjpeg and not skia?
As an additional information , i stepped into libjpeg and went till jddctmgr.c and found that JDCT_IFAST_SUPPORTED is not defined and i think this could be a cause of the failing.
Jon C
unread,
Sep 20, 2012, 3:22:59 PM9/20/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-d...@googlegroups.com
I ran into the same problem, and it turns out that libjpeg by default (in jmorecfg.h) only defines DCT_ISLOW_SUPPORTED, and undef's DCT_IFAST* or DCT_FLOAT*. However, in Skia, for SkImageDecoder_libjpeg.cpp, it sets cinfo.dct_method = JDCT_IFAST by default. This is why currently, out of the box, it doesn't look like skia would be able to decode jpeg. Setting cinfo.dct_method = JDCT_ISLOW (or presumably defining IFAST_SUPPORTED or FLOAT_SUPPORTED in jmorecfg.h) allowed it to work for me.
Anthony Catel
unread,
Sep 28, 2012, 8:47:23 AM9/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-d...@googlegroups.com
Same issue here.
The annoying thing is that DCT_I* macro are wrapper in JPEG_INTERNAL_OPTIONS which make skia impossible to #ifdef for the good value.
Setting it to ISLOW on SkImageDecode_libjpeg.cpp would be right choice IMHO.
Janez Zemva
unread,
Sep 28, 2012, 9:02:46 AM9/28/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message