www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Tiny Jpeg Decoder

reply Tomas Lindquist Olsen <tomas famolsen.dk> writes:
Hi all,
I've ported a small Jpeg decoder from C to D and decided I'll let you all
know about it. I needed it for a small image loading library I've been
working on. This will probably be released at some point as well, but until
then here's the jpeg decoding part.

BCS has kindly allowed me to put it in scrapple, so getting a copy should be
a familiar process to most D users. [1]

You can check out the scrapple site at: http://dsource.org/projects/scrapple
I made a small wiki page with a usage example,

The original C source code can be found at:
http://www.saillard.org/programs_and_patches/tinyjpegdecoder/

Hope it's useful for someone.

- Tomas Lindquist Olsen

[1]: http://dsource.org/projects/scrapple/browser/trunk/tinyjpeg
Apr 03 2007
next sibling parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Tomas Lindquist Olsen wrote:
 Hi all,
 I've ported a small Jpeg decoder from C to D and decided I'll let you all
 know about it. I needed it for a small image loading library I've been
 working on. This will probably be released at some point as well, but until
 then here's the jpeg decoding part.
 
 BCS has kindly allowed me to put it in scrapple, so getting a copy should be
 a familiar process to most D users. [1]
 
 You can check out the scrapple site at: http://dsource.org/projects/scrapple
 I made a small wiki page with a usage example,
 
 The original C source code can be found at:
 http://www.saillard.org/programs_and_patches/tinyjpegdecoder/
 
 Hope it's useful for someone.
 
 - Tomas Lindquist Olsen
 
 [1]: http://dsource.org/projects/scrapple/browser/trunk/tinyjpeg
 
Sweet. Three files and minimal dependencies! Know of any other tiny image format decoders? Specifically a decoder-only "tinypng" would be nice to have. Phobos has std.zip already so it should be possible to write a very tiny decoder. I guess most BMP and TGA decoders are tiny to begin with. GLD has a nice little TGA decoder that's 384 lines. Might be nice to extract that into a little scrapple lib too. --bb
Apr 03 2007
parent reply Gregor Richards <Richards codu.org> writes:
Bill Baxter wrote:
 Tomas Lindquist Olsen wrote:
 Hi all,
 I've ported a small Jpeg decoder from C to D and decided I'll let you all
 know about it. I needed it for a small image loading library I've been
 working on. This will probably be released at some point as well, but 
 until
 then here's the jpeg decoding part.

 BCS has kindly allowed me to put it in scrapple, so getting a copy 
 should be
 a familiar process to most D users. [1]

 You can check out the scrapple site at: 
 http://dsource.org/projects/scrapple
 I made a small wiki page with a usage example,

 The original C source code can be found at:
 http://www.saillard.org/programs_and_patches/tinyjpegdecoder/

 Hope it's useful for someone.

 - Tomas Lindquist Olsen

 [1]: http://dsource.org/projects/scrapple/browser/trunk/tinyjpeg
Sweet. Three files and minimal dependencies! Know of any other tiny image format decoders? Specifically a decoder-only "tinypng" would be nice to have. Phobos has std.zip already so it should be possible to write a very tiny decoder. I guess most BMP and TGA decoders are tiny to begin with. GLD has a nice little TGA decoder that's 384 lines. Might be nice to extract that into a little scrapple lib too. --bb
Search the newsgroups, somebody posted a port of lodepng. - Gregor Richards
Apr 03 2007
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Gregor Richards wrote:

 Sweet.  Three files and minimal dependencies!  Know of any other tiny 
 image format decoders?  Specifically a decoder-only "tinypng" would be 
 nice to have.  Phobos has std.zip already so it should be possible to 
 write a very tiny decoder.

 I guess most BMP and TGA decoders are tiny to begin with.  GLD has a 
 nice little TGA decoder that's 384 lines.

 Might be nice to extract that into a little scrapple lib too.

 --bb
Search the newsgroups, somebody posted a port of lodepng. - Gregor Richards
Thanks. It was Lutger. http://www.digitalmars.com/d/archives/digitalmars/D/announce/png_decoder_6677.html Here's the link: lutger.ifastnet.com/png.d --bb
Apr 03 2007
prev sibling next sibling parent reply orgoton <orgoton mindless.com> writes:
I have coded a TGA decoder that loads compressed and uncompressed TGA files. 24
or 32 bit. It's super-tiny (~100 lines of code). If you could use it in your
_open sourced_ project, I'd be glad to contribute.
Apr 04 2007
next sibling parent BCS <BCS pathlink.com> writes:
orgoton wrote:
 I have coded a TGA decoder that loads compressed and uncompressed TGA files.
24 or 32 bit. It's super-tiny (~100 lines of code). If you could use it in your
_open sourced_ project, I'd be glad to contribute.
If you want, I can let you put it up on scapple well.
Apr 04 2007
prev sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
orgoton wrote:
 I have coded a TGA decoder that loads compressed and uncompressed TGA files.
24 or 32 bit. It's super-tiny (~100 lines of code). If you could use it in your
_open sourced_ project, I'd be glad to contribute.
Hmm. I think the one in GLD handles 8-bit TGA gray maps too. Maybe gray+alpha also... hard to tell. And I don't think it's encumbered by any "open source only" license (GLFW, where it was ported from is Zlib). So... I should get off my duff and make a stand-alone port of it for scrapple. Anyway, I really like the idea of assembling a tiny, dependency-free, bare-bones collection of image loaders. Next step would be to give these PNG/JPEG/TGA loaders a consistent API for loading and such. --bb
Apr 04 2007
prev sibling parent Lutger <lutger.blijdestijn gmail.com> writes:
Tomas Lindquist Olsen wrote:
 Hi all,
 I've ported a small Jpeg decoder from C to D and decided I'll let you all
 know about it. I needed it for a small image loading library I've been
 working on. This will probably be released at some point as well, but until
 then here's the jpeg decoding part.
 
 BCS has kindly allowed me to put it in scrapple, so getting a copy should be
 a familiar process to most D users. [1]
 
 You can check out the scrapple site at: http://dsource.org/projects/scrapple
 I made a small wiki page with a usage example,
 
 The original C source code can be found at:
 http://www.saillard.org/programs_and_patches/tinyjpegdecoder/
 
 Hope it's useful for someone.
 
 - Tomas Lindquist Olsen
 
 [1]: http://dsource.org/projects/scrapple/browser/trunk/tinyjpeg
 
Very nice thank you!
Apr 05 2007