Steps to reproduce bug (this was tested on a 7.x site - the code looks to be the same for 8.x but will need to be tested out there as well):
- Create image preset where the images scale to a given width (in my case, the width was set to 260 pixels) and allow for upscaling.
- Have an image field associated with a bundle.
- Under display management for the bundle, select to view the image field with the given preset)
- Create content for bundle.
- Upload an image where the image is taller than the width (my image was 650 pixels wide and 864 pixels tall)
In my scenario, even though the backend image was actually 260 pixels wide and 345 pixels tall, the frontend output was:
<img width="147" height="195.601851852" title="This is a test" alt="Read more about the image at http://redcat.localhost:8080/visit/lounge-redcat#caption-image-2" src="http://redcat.localhost:8080/sites/redcat.org/files/styles/first-sidebar/public/redcat_sheet/associated-images/2011-11/K3F7674_02.jpg" longdesc="/visit/lounge-redcat#caption-image-2" typeof="foaf:Image">
Where you can see the image width does not match (I have uploaded part of the output from firebug so you can see what is happening).
Refactor the functions.
PASSED: [[SimpleTest]]: [MySQL] 37,325 pass(es). View
|#37||refactor-image_dimensions_scale-37.patch||8.47 KB||Tor Arne Thune|
PASSED: [[SimpleTest]]: [MySQL] 34,104 pass(es). View
|#37||interdiff-35-37.txt||746 bytes||Tor Arne Thune|
PASSED: [[SimpleTest]]: [MySQL] 34,111 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 34,053 pass(es). View