To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 8745
8744  |  8746
Subject: 
Re: LPub 2.1.0.8 Available
Newsgroups: 
lugnet.cad, lugnet.cad.dev
Date: 
Sat, 19 Apr 2003 21:57:31 GMT
Viewed: 
317 times
  
In lugnet.cad, Kevin L. Clague writes:
Do you know of a Delphi compatible PNG package?  I'd *love* to use PNG.

I know that Anders already responded to this privately, but I'm posting this
in case his response was different.

The official PNG library (from the creators of the PNG format) has Borland
C++ Builder 5 project files, along with some instructions on how to use the
library from C++ Builder.  They probably have binary DLL distributions, but
I personally found it easier to just compile my own static libraries (using
their Visual Studio project files).  This allowed me to have PNG support
statically linked into my program, and also allowed me to set the
compile-time options the way I wanted.

You can find the libpng download page here:

http://www.libpng.org/pub/png/libpng.html

One note about libpng.  I personally found it to be a royal pain to use.
You'll DEFINITELY need to read the documentation.  The library has all kinds
of support for being used to do things like display progressive PNG files
while downloading, but these added features come at the expense of making
simple PNG loading and saving much more difficult than they should be.

If you want you might look at the TCPngImageFormat class in the LDView
source.  Feel free to use any of the code there you want, for that matter.
The class is about 350 lines long, and all it does is handle reading and
writing a PNG file into and out of my internal image format.  I have another
generic class that handles format-independent image operations.

You can probably even use the classes directly (they at least used to
compile in Linux, so I don't see why Builder would be a big problem).  If
you do so, though, you should be aware that their base class implements
reference counting, and their destructors are protected.  Because of this,
you need to use their release() member function instead of delete, and
cannot create an instance directly, only via new.

--Travis Cobbs (tcobbs@remove.halibut.com)



Message has 1 Reply:
  Re: LPub 2.1.0.8 Available
 
Anders and Travis, Thanks so much for all the help. I can hardly wait to switch to PNG support. Bitmaps are lossless, but huge, and JPEG is compact but lossy. It will be great to just use the one format. Kevin (...) (22 years ago, 20-Apr-03, to lugnet.cad, lugnet.cad.dev)

Message is in Reply To:
  Re: LPub 2.1.0.8 Available
 
(...) Hi Anders, Yes. I'm using Borland C++ builder 5 and their jpeg unit. (...) Do you know of a Delphi compatible PNG package? I'd *love* to use PNG. Thanks, Kevin (...) (22 years ago, 19-Apr-03, to lugnet.cad, lugnet.cad.dev)

14 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR