Please,,, give me any information on how to decode JPEG, PNG.

314 views
Skip to first unread message

김영곤

unread,
Mar 25, 2013, 3:49:05 AM3/25/13
to skia-d...@googlegroups.com
Please,,, give me any information on how to do decoding Images like JPEG, PNG, etc...
 
Actually, I've been studying these things like full decoding and region decoding.
 
BuildtileIndex method is firstly needed for Region decoding. And then,,,,, we couldn't understand any more because we never know the engine of Skia.
 
Give me any information on flow of Skia engine for decoding Images.

Derek Sollenberger

unread,
Mar 25, 2013, 9:04:35 AM3/25/13
to skia-d...@googlegroups.com
The region decoder is currently not supported on most platforms as it currently relies on some modifications to libjpeg and libpng that only Android supports.  I will work on implementing a generic version that will work with all codecs, but when that makes it into the code base is still to be determined.

However, decoding the entire image should be fairly straightforward.  The simplest way to do it is create a stream containing your compressed image and pass it to SkImageDecoder::DecodeStream(...) which will determine the correct codec to use and put the result into the bitmap you provide.


--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at http://groups.google.com/group/skia-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

杨继超

unread,
Jun 4, 2013, 6:19:04 AM6/4/13
to skia-d...@googlegroups.com
As Derek said, there are SkImageDecoder and SkImageEncoder for various image types such as JPEG, PNG etc, you could look over the source in /src/images folder.

However, skia depends on the Windows Imaging Component.
Reply all
Reply to author
Forward
0 new messages