This section of the archives stores flipcode's complete Developer Toolbox collection, featuring a variety of mini-articles and source code contributions from our readers.


  NexgenIPL - Image Library
  Submitted by

I have spent the last week doing research into graphic file formats. I was looking around for a decent library to load .png files, but libpng was not easy enough to use, included too much baggage and didn't give me what I needed. I was considering the possibility of writing a de-compressor from scratch when I came across this:

Easiest thing in the world to use and extremely powerful. Now and I can read from and write to any graphics file format with only one line of code. Here is my first "test" program:

#include <windows.h
#include "BTC/btc.h"

int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { BTCImageObject Object; Object.Load("test.bmp"); Object.Save("output.png",Object.GetCodecIdFromExtension("png",BTCODECTYPE_ENCODER)); return 0; }

It worked perfectly! It opened up test.bmp and saved a copy of it into output.png. Super-easy and super powerful. I think this amazing resource deserves to be shared with the entire development community.

Rick Scott

The zip file viewer built into the Developer Toolbox made use of the zlib library, as well as the zlibdll source additions.


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.