Delphi - PNGImage - PNG format issue

Hi there,

Please know that I do not know Delphi.

I have an application programmed in Delphi, that uses PNGImage.  Not from the one included in the most up to date Delphi but the one found in the following website: "http://proger.i-forge.net/Useful_Delphi_packages/71R".

I am starting to have issues.  I am getting the following error: "The file being readed is not a valid "Portable Network Graphics" image because it contains an invalid header. This file may be corruped, try obtaining it again"

This application converts PNG files into PDF files.  These PNG image files were fine until I had JPEG converted to PNG.

I tested the converted PNG files with TwealPNG and they are all fine, with apparently a proper header.

QUESTIONS:
-If you know what is causing this issue, can you please provide the tweek so my programmer (that has no clue how to deal with this) can implement it in Delphi?
-Is there a way, command line with a tool (to run in a batch file which I am kind a good in) where I can match the PNG format/header of the converted JPEG files to the proper format/header of the PNG file so that it actually works?

Thanks for you feedbacks, help and suggestions.

Cheers,
Rene
LVL 10
ReneGeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PeterDelphinCommented:
Which Delphi version do you have?
0
PeterDelphinCommented:
With this FREE library, Delphi programs can read and write BMP, ICO, CUR, PNG, MNG, PCX, TIFF and JPEG 2000 bitmaps:

ImageFileLib
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ReneGeAuthor Commented:
Good morning peter,

Thanks for your prompt reply.

I'll look at it and come back to you very shortly.

Cheers,
Rene
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Sinisa VukSoftware architectCommented:
You can try SynGdiPlus units with fast png reading and conversion.
0
ReneGeAuthor Commented:
@Peter
By using XN Resource Editor:
RCData -> DVCLAL -> A2 8C DF 98 7B 3C 3A 79 26 71 3F 09 0F 2A 25 17
According to http://www.delphigroups.info/2/e1/410287.html
It was compiled using Delphi Version 3

@Sinisa
I'll look at it and come back to you very shortly.

Cheers,
Rene
0
ReneGeAuthor Commented:
Thanks for all your help :)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.