PNG malformed: can you find differences ?

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
Locked
myspacee
Posts: 156
Joined: 2007-06-14T02:09:35-07:00

PNG malformed: can you find differences ?

Post by myspacee »

Hello,
in these COVID times, I try to build an online tool for my collegues :
http://gazzettannunci.gazzettadimantova.it/PRJ/pagine/

But i've strange results. This little app allows you to take notes on given image.

On web this work, java creates correctly a PNG : http://gazzettannunci.gazzettadimantova ... rage/1.png

But when i try to pass PNG info, and create a PNG on server side i've a weird file (interlaced?!?) :
http://gazzettannunci.gazzettadimantova ... rage/2.png

Can you find differences for these two files ?

Thank you,
m.
Last edited by myspacee on 2020-03-26T06:57:44-07:00, edited 1 time in total.

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: PNG malfomerd: can you find differences ?

Post by snibgo »

myspacee wrote:But when i try to pass PNG info, and create a PNG on server side i've a weird file (interlaced?!?) :
Perhaps there is a problem with the code that does this.
snibgo's IM pages: im.snibgo.com

myspacee
Posts: 156
Joined: 2007-06-14T02:09:35-07:00

Re: PNG malfomerd: can you find differences ?

Post by myspacee »

I know snibgo,
I use PHP GD to reconstruct PNG from a base64 string.

The string in http should be the same passed to PHP functions....

Is there any way to analize file 1.png and 2.png ?

OR

Can IM decode this base64 txt and return image ?
http://gazzettannunci.gazzettadimantova ... base64.zip

m.

myspacee
Posts: 156
Joined: 2007-06-14T02:09:35-07:00

Re: PNG malformed: can you find differences ?

Post by myspacee »

Hello find solution:
my base64 image string contains also empty spaces,
replace them with '+' and decode go well....

thank you for your time,
m.

Locked