The simpler media website CMS
hi
I have something going wrong with png files.
when I try to insert a custom sized image with tinyZenpage of a png image, I have a wrong cropped picture.
If I use the sized image, it works well.
I have no issue with jpg files.
You can have a look here: https://test.vincentbourganel.fr/news/test-png-files/
Comments
I have never heard of "dng" files.Judging by your site you apparently mean "png" files?
png files do not have (support) meta data like jpgs do so that might be an issue here. But the size should be included. But be sure you don't use "cleaned for web" versions as that strips all extra info often.
GD or Imagick?
To be able to reproduce any issue we need the values you have used with tinyZenpage. Please add a screenshot of each to that page so we can try ourselves.
my mistake, I was speaking about png files (but btw, DNG files exist: https://en.wikipedia.org/wiki/Digital_Negative)
I edited title, content and links.
you can use full image here: https://test.vincentbourganel.fr/albums/images/illustrations/2019.png.
the picture size of my theme is 800px (for sized image).
the right generated cache image is
/cache/images/illustrations/2019_800.png?cached=1548249339
the custom size used is 400px.
the wrong (cropped) generated cache image is
/cache/images/illustrations/2019_400.png?cached=1551105491
btw, I have the same trouble with gig image (example will follow)
as told before, same trouble with gif files:
https://test.vincentbourganel.fr/news/test-gif-files/
with custom size, the picture is cropped and "white" is added at the bottom of the original picture
Sure but not a webformat Zenphoto or any other tool could natively process ;-)
Again what are the settings you used to crop? I don't see anything related to cropping there.
And also again what library: GD or Imagick?
White usually means transparency got lost. We actually fixed that for png/gif in the support build (which I assume you are using anyway).
I use GD library.
to create these picturee I use tinyZenpage.
then I use "Custom size (un-cropped)" of "image size" (set to 400px).
you are right, white means transparency :-)
of course, as usual, I use the latest build, and in my test case, there no lost transparency, there is a wrong cropping, with "added picture" (the picture is higher than before).
you can have a look on the generated cache image here: https://test.vincentbourganel.fr/cache/images/illustrations/carte-co_220.gif
Above you wrote:
So the issue is you get a somehow cropped picture although you wanted an uncropped one? It cannot be a "wrong cropped" image because a "sized image" is of course never cropped.
Don't mean to be picky as English is of course not the native language for both of us. Just don't want to investigate in the wrong direction! ;-)
for png file, I want a sized image (set 400px, supposed to be the width as it is the longest size)
but in fact (I don't seen it before), the picture is cropped (as I can see the right of the picture) and is sized to 400px on height value. as the original height was lower than 400px, transparent pixels are added at the bottom of the picture).
have a look on the generated picture: https://test.vincentbourganel.fr/cache/images/illustrations/2019_400.png
in fact, it is the issue with png and gif file.
hope that's more clear.
Okay, so far understood. It is only an issue with tinyZenpage? You don't get this on the theme itself, right?
I disabled tinymce
in html content, I add this code:
but the issue is the same (I have a 250 sized picture on the heigh size and not the width, so the picture is cropped and transaprency is added).
again, have a look here: https://test.vincentbourganel.fr/news/test-png-files/
I can reproduce the issue with the first image that is cropped where it shouldn't. The 2nd even on your site seems to be correctly scaled. I don't see any white or cropping actually.
tinyZenpage probably does things wrong. Wanted to change that to a content macro anyway some time. That also can better cover missing images and such. Maybe I should do this now…
It's not specifically a tinyZenpage thing. It's a png/gif thing.
Use any png/gif file in the zenpage theme for example. You'll see right away that things are wrong.
Well, I tried both example images and I don't see anything wrong in the Zenpage theme. However that is using maxspace images and not standard sized images on the image page. But even with basic all looks as it should to me…
I also tried on the test install with the basic theme using standard sized images on our server and cannot reproduce it…
Please try the support build that should work with pngs/gifs correctly now.
hi,
as far I can test, the fix works well for gif/png files
Thanks for the confirmation.