tag:blogger.com,1999:blog-5246987755651065286.post8438779436108650312..comments2024-02-22T16:15:42.388-08:00Comments on cbloom rants: 01-10-09 - Simple Imagecbloomhttp://www.blogger.com/profile/10714564834899413045noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-5246987755651065286.post-56413478478766474502009-01-14T16:14:00.000-08:002009-01-14T16:14:00.000-08:00I too have used GDI+ which should be pretty much a...I too have used GDI+ which should be pretty much automatically available everywhere (so one less DLL to think about). It's a bit of mucking around because you have to create a bunch of crap to just copy the data out into a char array (create a stream, GlobalAlloc a buffer, etc) but at least you don't have to distribute extra DLLs (though of course then it's not linked into your binary).Samhttps://www.blogger.com/profile/01843393036648718286noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-80848012867405507372009-01-14T15:31:00.000-08:002009-01-14T15:31:00.000-08:00Since I added interlaced support, I think these da...Since I added interlaced support, I think these days the only PNG restriction in stb_image is 8-bit depth. I guess it wouldn't be that hard to add 1/2/4-bit unpacking, but you just don't find those in the wild very much anyway (since it compresses on bytes with an arithmetic-y prediction, it's not going to work very well for bit-packed stuff, I think... although that's already true for paletted stuff too).<BR/><BR/><I>I recently hit this -- just switching the dll projects over to static libs (so I could forget about dll delivery) worked for me.</I><BR/><BR/>Just be careful of what libs you do this with, since LGPL libs require shipping as DLLs. (I guess this isn't true for zlib and libpng, at least, so it does work in this case.)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-23946786626684435982009-01-14T09:53:00.000-08:002009-01-14T09:53:00.000-08:00Yeah, switching to static libs is better, though l...Yeah, switching to static libs is better, though libpng doesn't ship a static lib so I have to build their project (fingers crossed), and it also sucks cuz I make a whole bunch of tiny command line utils like "crop" , "resize" , etc. and now they'll all be 250k<BR/><BR/>Hmm.. it seems like you should be able to "link in a DLL" , like actually grab the code out of the DLL at link time and turn it into a static linkage, is that possible?<BR/><BR/>... STB_image is totally almost awesome. I didn't realize he had PNG in there too or I would've just used that instead of getting into libpng at all. However, it doesn't really fix the retarded overcomplex format - he just supports a simple subset of PNG which is a little bit disturbing to me.cbloomhttps://www.blogger.com/profile/10714564834899413045noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-87466193717982674542009-01-14T08:04:00.000-08:002009-01-14T08:04:00.000-08:00I recently hit this -- just switching the dll proj...I recently hit this -- just switching the dll projects over to static libs (so I could forget about dll delivery) worked for me. <BR/><BR/>Also, windows GDI+ provides png/jpg bitmap class so I'm using it for now; and there's a mac equiv for my other platforms.Michaelhttps://www.blogger.com/profile/14045209789060744520noreply@blogger.comtag:blogger.com,1999:blog-5246987755651065286.post-44736266747020226012009-01-14T01:55:00.000-08:002009-01-14T01:55:00.000-08:00stb_image.h to the rescue?stb_image.h to the rescue?NeARAZhttps://www.blogger.com/profile/05547971612651449893noreply@blogger.com