From my reading of fn_resize_image, it uses 2 of the settings for thumbnails.
1) Whether to connvert new image to same or different format ("Same as source") which equates to "original" in the function.
2) The Jpeg compression quality which is set to 80.
I do not see anywhere that thumbnail sizes come into play.
I too cannot see why this should/would be happening. But it is. It's as if the vendor settings are not inheriting the setting set by the admin.
Update: It seems that the issue is the function fn_get_mime_content_type is returning 'application/octet-stream' rather than 'image/jpeg' for the jpeg file. fn_resize_images() set the "from file extension" parameter to false.
So I'm not sure how to correctly address this. Not sure whether to add the 'appliation/octet-stream' to return 'jpg' in the fn_get_image_extension() function or whether to set the 'get from extension' parameter to 'true' in fn_resize_image().
I'm thinking changing the parameter to true would be the least impactful method.
Details of what the various functions/settings/returns are from resizing an image are below. I will submit a defect the fn_get_mime_content_type() function is not returning the proper type for a downloaded jpg file (which I find really hard to believe). But the data is what the data is.
[Wed, 25 Nov 2015 22:58:11 +0300]
fn_resize_image: src=images/detailed/2/2015-08-03_13_1its-zg.47.25.jpg
fn_get_mime_content_type:application/octet-stream
fn_get_image_extension(fn_get_image_extension()=
fn_resize_image: format=png, settings:Array
(
[thumbnail_background_color] => #ffffff
[convert_to] => original
[jpeg_quality] => 80
[product_lists_thumbnail_width] => 150
[product_lists_thumbnail_height] => 150
[product_details_thumbnail_width] => 280
[product_details_thumbnail_height] =>
[product_quick_view_thumbnail_width] => 220
[product_quick_view_thumbnail_height] =>
[product_cart_thumbnail_width] => 120
[product_cart_thumbnail_height] =>
[category_lists_thumbnail_width] => 60
[category_lists_thumbnail_height] =>
[category_details_thumbnail_width] => 120
[category_details_thumbnail_height] =>
[category_detailed_image_width] =>
[category_detailed_image_height] =>
)
ar_resize_image: orig_x=3264, x=2048, orig_y=2448, y=1536, path=images/detailed/2/2015-08-03_13_1its-zg.47.25.jpg strlen(new_content)=15158069
images/detailed/2/2015-08-03_13_1its-zg.47.25.jpg old_size=891487, new_size=15158069
After changing the "use extension" parameter to true, things run nice and fast and the results are what's expected.
[Wed, 25 Nov 2015 23:15:40 +0300]
fn_resize_image: src=images/detailed/2/2015-07-25_15_au8c-c3.28.57.jpg
fn_get_mime_content_type:image/jpeg
fn_get_image_extension(fn_get_image_extension()=
fn_resize_image: format=jpg, settings:Array
(
[thumbnail_background_color] => #ffffff
[convert_to] => original
[jpeg_quality] => 80
[product_lists_thumbnail_width] => 150
[product_lists_thumbnail_height] => 150
[product_details_thumbnail_width] => 280
[product_details_thumbnail_height] =>
[product_quick_view_thumbnail_width] => 220
[product_quick_view_thumbnail_height] =>
[product_cart_thumbnail_width] => 120
[product_cart_thumbnail_height] =>
[category_lists_thumbnail_width] => 60
[category_lists_thumbnail_height] =>
[category_details_thumbnail_width] => 120
[category_details_thumbnail_height] =>
[category_detailed_image_width] =>
[category_detailed_image_height] =>
)
ar_resize_image: orig_x=3264, x=2048, orig_y=2448, y=1536, path=images/detailed/2/2015-07-25_15_au8c-c3.28.57.jpg strlen(new_content)=305009
images/detailed/2/2015-07-25_15_au8c-c3.28.57.jpg old_size=824032, new_size=305009