"Generate resized copies of scaled images" behaviour

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
Richard W
Propeller Head
Posts: 21
Joined: Fri May 10, 2019 1:54 am

"Generate resized copies of scaled images" behaviour

Post by Richard W »

Hello,

I have a question about the expected behaviour of the "Generate resized copies of scaled images" option in the Target -> Advanced settings.

I have image styles in my project that set a maximum width for images in the output. (max-width: 800). Let's say I have an image on the source page called MyImage.png which is by default 1000px wide (and 500px deep for the sake of argument),and I apply this style. With the "Generate resized copies of scaled images" option switched on, as it is by default, the output file would include a resized image, generated by Flare, called MyImage_800x400.png, and it would use this image in the page in place of the original. Fair enough so far.

The problem is that the resized image is a bit fuzzy - fuzzier than it is if you simply put the original MyImage.png in an HTML page and let the browser resize it using the stylesheet settings. (This isn't all that noticeable to me, but it annoys my boss who wants me to fix it! And it is noticeable). Also, if the resized image is an animated gif, it stops working - as I mentioned a few months ago in a different thread.

In that thread, somebody suggested turning off the "Generate resized copies..." option as a solution to the animated gifs problem. I would expect, if I turned off that option, that the output for my page would include the original MyImage.png file, apply the style from my stylesheet, and let the browser resize it.

For me, though, it has no noticeable effect. In practice I get (what looks like) exactly the same output as before, with a regenerated image MyImage_800x400.png. When experimenting previously, I even tried using an image for which I knew the resized version didn't already exist just to make sure it wasn't picking up an existing one, and it still regenerated a resized copy.

Am I misunderstanding what the effect of turning off the "Generate resized copies..." option should be? And if so, is there a way to make the output behave as I want (i.e. using my original images and letting the browser resize them)?

Thanks!

Richard
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: "Generate resized copies of scaled images" behaviour

Post by NorthEast »

If you have used max-width in your CSS, then that's a known bug. Flare will generate a resized image, even though that setting is switched off in the target.

You can use the width property in your CSS without it generating a resized image, but using max-width will always cause Flare to generate a resized image.

If that's the same problem you have, then please report it as a bug.
I've reported this a number of years ago, and if enough people report it, it may eventually get fixed!
Richard W
Propeller Head
Posts: 21
Joined: Fri May 10, 2019 1:54 am

Re: "Generate resized copies of scaled images" behaviour

Post by Richard W »

Hmm, thanks. I am using max-width, so I must be seeing the bug you mention - I'll raise it, as you say.

However, I switched to width: 800 and it didn't help. With "Generate resized images..." switched on, it looks the same as before. With width: 800 and "Generate resized images..." switched off, the original image does appear in the output, but at its original size, ignoring the width setting. This is despite having the correct style applied to it, which should have a "width" element. It seems the width on the style is found to be invalid, weirdly (see below). The CSS is valid and works fine if I just put it in a hand-written HTML file to resize the image.
Width style not working.png
I'd actually noticed that it was saying that the max-widths were invalid when using the resized images, but in those cases the setting was having no effect anyway (as the image was already that size) so I had just ignored it. This must be a part of the issue, though...!

Off to raise a bug, thanks.
You do not have the required permissions to view the files attached to this post.
NorthEast
Master Propellus Maximus
Posts: 6363
Joined: Mon Mar 05, 2007 8:33 am

Re: "Generate resized copies of scaled images" behaviour

Post by NorthEast »

If your CSS just has width: 800; , then that will be invalid because it doesn't have any units - it's missing the "px".
Richard W
Propeller Head
Posts: 21
Joined: Fri May 10, 2019 1:54 am

Re: "Generate resized copies of scaled images" behaviour

Post by Richard W »

I've raised the max-width issue and the width issue as two separate bugs - thanks for your suggestion.

(edit) Ah, is that different between width and max-width? max-width didn't need "px" after it... also, that CSS seemed to work OK when I tried it in a hand-written HTML file. I'll have another look at that - thanks.

(edit again) You are right, with "width: 800px" it works...! It appears Flare is stricter on needing that px unit than my browser is, because my hand-written page works without it. Also max-width seemed to work without it, and our CSS stylist guy didn't put the unit in when supplying these styles in the first place.

Anyway, that seems to have fixed my problem, thank you!
Psider
Propellus Maximus
Posts: 815
Joined: Wed Jul 06, 2011 1:32 am

Re: "Generate resized copies of scaled images" behaviour

Post by Psider »

I think width and max-width always have to have a unit, according to the spec. (except 0 (zero) where you can leave it out).

I did find mention of a Quirks Mode for Firefox which assumes px if the unit is left off, but it's definitely not standard. https://developer.mozilla.org/en-US/doc ... e_behavior
Post Reply