How to prevent WebHelp from downconverting images

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Simon_Dismore
Posts: 205
Joined: Thu Jul 13, 2017 2:57 pm

Re: How to prevent WebHelp from downconverting images

Unread post by Simon_Dismore »

mmccullo wrote:Yes, an option to prevent resampling in that dialog would be most welcome.
It might be a good idea to post this as a new request in the H&M Wish List forum. Or perhaps ask Tim to move this topic to there?
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: How to prevent WebHelp from downconverting images

Unread post by Martin Wynne »

Simon_Dismore wrote:It might be a good idea to post this as a new request in the H&M Wish List forum. Or perhaps ask Tim to move this topic to there?
Maybe, but what's baffling me is why anyone would insert an image in webhelp at other than 100% ? In 15 years using H&M I can't remember doing that ever. Why prepare an image at one size, and then insert it at some other size? It is certain to lose quality. When preparing an image, you surely know what size you want? :?

regards,

Martin.
Simon_Dismore
Posts: 205
Joined: Thu Jul 13, 2017 2:57 pm

Re: How to prevent WebHelp from downconverting images

Unread post by Simon_Dismore »

Martin Wynne wrote:what's baffling me is why anyone would insert an image in webhelp at other than 100% ? In 15 years using H&M I can't remember doing that ever. Why prepare an image at one size, and then insert it at some other size? It is certain to lose quality. When preparing an image, you surely know what size you want? :?
Possible motivations for wanting a less-than-100% image without resampling include:
  • The original images have already been optimised, and you don't want the effort of re-optimising. When H&M re-samples them at small size, the files can actually get bigger (see steps below).
  • You're using an image multiple times at different sizes. Whether you do it or H&M, resampling generates multiple files, whereas having a scaling factor requires only one file.
  • You're using an image multiple times at different sizes. You want to be able to replace all instances of the image without having to republish from H&M. So you need the filename to stay the same.
  • You're publishing to PDF and WebHelp. You already prepared a large image for fidelity when zooming the PDF as Tim suggests, and you want the image to look good in Webhelp on a 4K-like monitor.
  • When subresource integrity is supported for <img> elements, you don't want to be forced to recompute hashes for every variation in image size.
example-shrunk.png
example-shrunk_zoom60.png
Steps to show reducing image size can increase file size:
  1. browse to https://tinypng.com/
  2. download example-shrunk.png
    size is 15,391 bytes (16,384 bytes on disk)
  3. add it to an H&M project, at 60% of physical size
  4. publish to skinless Webhelp
  5. look for example-shrunk_zoom60.png in output folder
    size is 18,461 bytes (20,480 bytes on disk)
  6. transparency seems to have been lost too, which might be important if you use images on non-white backgrounds.
You do not have the required permissions to view the files attached to this post.
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: How to prevent WebHelp from downconverting images

Unread post by Martin Wynne »

Hi Simon,

I agree that I can't see any reason for H&M to resample images in webhelp when that can easily be left to the browser if wanted.

What I meant was that you can easily avoid the resampling by inserting at 100%. If that doesn't produce the desired result you can give the image an HTML Class and adjust it in the CSS. Or insert it in a single-cell table. If you want a different result for PDF you can repeat the image in conditional text. All that works now, without needing a new function in H&M.

cheers,

Martin.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: How to prevent WebHelp from downconverting images

Unread post by Alexander Halser »

When I run WebHelp, it wants to convert all images to 96 DPI at the scaled size.
I'm puzzled. Where do you get a downscaled image in Webhelp with Help+Manual 7?
You said you are working with a PNG. But all native images (JPEG/PNG/GIF) are simply copied to the Webhelp output folder, at their original resolution.
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: How to prevent WebHelp from downconverting images

Unread post by Martin Wynne »

Alexander Halser wrote:I'm puzzled. Where do you get a downscaled image in Webhelp with Help+Manual 7? You said you are working with a PNG. But all native images (JPEG/PNG/GIF) are simply copied to the Webhelp output folder, at their original resolution.
Hi Alexander,

That's what I had always assumed. But it isn't true (Build 4431). H&M now resamples images if you set an image size of say 50%. If I do that on one of my PNG images, here is the content of my output folder :
hm_image_50percent.png
The image actually used in the HTML output is the one labelled _zoom50.png. It was not created by me, even though it has been given the same timestamp as my image. Notice also that the file size has almost doubled (my PNG is 8-bit colour), despite the reduced pixel size.

cheers,

Martin.
You do not have the required permissions to view the files attached to this post.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: How to prevent WebHelp from downconverting images

Unread post by Alexander Halser »

I bow my head, you guys are absolutely right... :oops:
Alexander Halser
Senior Software Architect, EC Software GmbH
User avatar
Martin Wynne
Posts: 2656
Joined: Mon May 12, 2003 3:21 pm
Location: West of the Severn, UK

Re: How to prevent WebHelp from downconverting images

Unread post by Martin Wynne »

Hi Alexander,

It's a recent change.

Just tried in 7.3.0.4120, and it is not resampling. So you were not dreaming. Nor me. :)

cheers,

Martin.
User avatar
Alexander Halser
EC-Software Support
Posts: 4098
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: How to prevent WebHelp from downconverting images

Unread post by Alexander Halser »

The problem has been fixed with Help+Manual Build 4434:
https://www.helpandmanual.com/downloads.html
Alexander Halser
Senior Software Architect, EC Software GmbH
mmccullo
Posts: 11
Joined: Thu Jan 20, 2005 12:13 am

Re: How to prevent WebHelp from downconverting images

Unread post by mmccullo »

Alexander Halser wrote:The problem has been fixed with Help+Manual Build 4434:
https://www.helpandmanual.com/downloads.html
Thank you! I also just verified it is fixed in Build 4434.
jabramoff
Posts: 27
Joined: Sun Aug 05, 2018 12:55 pm

Re: How to prevent WebHelp from downconverting images

Unread post by jabramoff »

Hello. I'm using 7.5.3 build 4740, and it appears to me that when I publish to WebHelp, H+M exports images scaled at the percentage I have specified for the Display size and set to % of physical image size, which contradicts what appears at https://www.helpandmanual.com/help/hm_w ... esize.html, under WebHelp, ePUB, Kindle and eWriter: Export images with original dimensions
The images are exported with their original native dimensions when you publish to to these formats...
I've opened another topic, WebHelp image export http://helpman.it-authoring.com/viewtop ... 232eb8bf38.
User avatar
Tim Green
Site Admin
Posts: 23155
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: How to prevent WebHelp from downconverting images

Unread post by Tim Green »

Ah, now I see what you mean. Yes, that is a new setting that was introduced a few updates ago and needs to be changed in the documentation. If you set percent of physical size now the image will be physically rescaled. That setting should not be used at all any more really, because it is only useful on old monitors where each pixel in the image represent a pixel on the monitor. It does not work well on modern devices with a wide range of resolutions and pixel densities. You should use the responsive setting % of page size, with the maximum set to the actual/physical size of the image.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply