Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PNG, GIF and TIFF

Status
Not open for further replies.

matematik

Programmer
Aug 13, 2007
8
SI
So I'm working on application which is using TPicture. I load all picture to TBitmap in TPicture. For JPEG's i use this code:
TJPEGImage * test;
test = new TJPEGImage;
test->LoadFromFile("test.jpg");
TPicture * test2;
test2->Bitmap->Assign(test);
This code works fine. But now I want to load also PNG, GIF ans TIFF images. How can I do that?
 
I've seen it done in GDI+. I'll look around some more for other options, too.


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
You can read pixel by pixel , all the image, and create a new image that would be a bitmap.
 
>>You can read pixel by pixel , all the image, and create a new image that would be a bitmap.

don't do that unless you really have to (or may be you just like to reinvent the wheel).
Unless you 'll find a ready workable code to decode all formats you need.
There are better things to spent a time on
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top