ZenphotoCMS Forum
Problems with aspect ratios and constant image height on later ZP versions - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Problems with aspect ratios and constant image height on later ZP versions (/thread-13431.html)

Pages: 1 2 3


Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-13

For some reason the width/height attributes are miscalculated on your site:
[img]/photo/galleries.new/cache/panorama/dublin_s_780.jpg?cached=1594639794[/img].
But I have no idea how this would happen except if embedded metadata is wrong so ZP uses that.




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-13

The width/height attributes are actually correct and conform to the defined 780 pixels height, that is why the browser is upscaling the cached jpeg. What is incorrect is the stored cached JPEG itself (780x161).




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

I cannot reproduce this, see screenshots here: https://www.zenphoto.org/test/

Since you are using a modified Basic theme try the original one from 1.5.7 just to be sure this is not an issue of your modification perhaps based on an old version.




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

It was modified from the current version, but I just copied the original theme from the 1.5.7 archive. Same result.




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

Sorry, if I cannot reproduce it I cannot fix anything.




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

I know. All I could do is plug in a debug executable if you have one, and collect some data.




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

You could try the mark release plugin to enable some debugging modes

But if it is the image itself I would have to see it. Do you have both GD and Imagick for image processiong perhaps? If so try switching if it makes any difference (it should not, but…)




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

Imagick installed & enabled, same result.




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

I just tried on our own server's demo instal just to be sure that the local one does not behave differently: Here with 595px and height:
https://demo.zenphoto.org/test/dublin_s.jpg.html
(you might need to switch to the Basic theme on the top left if not enabled for you). Works as well as you can see.




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

Set installation to debug, not getting anything in the debug log though..




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

Ah, sorry, the plugin is not enough for image processing debugging. You have to hack a core file currently. Open zp-core/globa-definitions.php and find/set define('DEBUG_IMAGE', false); to true. Then you should get some info about image processing.




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

I have run it on the pano image:
http://leitseite.net/debug.log




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

Sadly that does not really help. Since the original image "dublin-s" has already 780px height, it should not be processed at all if you set size 780 and height. Therefore I don't get any processing in the log.




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

At least we can see the variables. Are these set correctly? "size" is set, but no height or other dimensional vars..




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

For the actual image parameter regaring class methods/functions that is correct. Default images/thumbs only use the $size parameter as all else depends on the "side" options. Internally it is then calculated accordingly. You see height and width values on the later entries in that log. It looks to me as it should…




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

What setting do you have on http://leitseite.net/photo/galleries/index481b.html?album=panorama&image=dublin_s.jpg right now? That is excatly what I get with shorest side/height setting for this image.

What does this mean in the source of your site?
``

So this is a static version of the page, right?




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

Yep, I made this copy before I moved over to another server.
The old installation is no longer working. It also has no zp-data directory. Maybe it saved its settings in the DB.

p.s. I just saw the latest version does not store its image settings there either..




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

I seriously don't remmeber when the zp-data directory was introduced.

p.s. I just saw the latest version does not store its image settings there either..

What do you mean?




Problems with aspect ratios and constant image height on later ZP versions - enjay - 2020-07-14

I thought ZP stored all its settings in zp-data, but it doesn't. Never mind.




Problems with aspect ratios and constant image height on later ZP versions - acrylian - 2020-07-14

Only the general config stuff of course, all else in the datbase. And 1.2.5 does not yet have a zp-data folder, the config should be in the core folder or was just outside (don't remember anymore ;-))