Page 1 of 1

PNG malformed: can you find differences ?

Posted: 2020-03-26T04:22:28-07:00
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.

Re: PNG malfomerd: can you find differences ?

Posted: 2020-03-26T05:53:24-07:00
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.

Re: PNG malfomerd: can you find differences ?

Posted: 2020-03-26T06:06:50-07:00
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.

Re: PNG malformed: can you find differences ?

Posted: 2020-03-26T08:31:51-07:00
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.