Monday, November 28, 2011

Understanding RESIZE vs SCALING

It is important to understand the difference between Resize and Scaling for websites in general, but then to understand that Scaling in Kindle is different again.

In general web authors display an image on a website at full size, and sure way to do that is just specify the image [img src=...] without any attributes, eg width=x height=y. However if you do specify the exact same size as image, the page opens in a far more orderly manner as "placeholders" open first and images form in that space, albeit fast broadband these days means a well designed webpage opens instantly in either case.

Generally it would be stupid to specify an image say 800 wide and put an attribute of width=200 because the image would be SCALED to 200 but the browser would still have to download an image about 16 times too big for no good reason. However in some cases the site may say right click on this image [scaled to 200] in order to download direct the full size image at 800. In such a case the scaled image is essentially a Thumbnail.
 ***
IMPORTANT SIDE ISSUE RE PPI/DPI

In essence this is exactly the situation that confuses people so much with images in Word.  Your PC screen is probably set at 96 ppi, but let's round it off to 100 ppi.  Word is a Word Processor and is therefore designed to produce PRINT output, and modern printers can produce high resolution prints.  So lets set our printer as 400 dpi [DOTS/inch] so the 800 wide image will measure 2 inches when printed.

So Word does all that by SCALING the image to 200 wide ON YOUR SCREEN, meaning it is displayed at 100 ppi but Scaled to 25% size.

Now the big problem is if one simply saves the Word file as html [filtered or unfiltered], the conversion simply sees the Scaled image so it goes into Kindle as 200 wide.  That is why Amazon says to insert images into the html and NOT the Word file, but seems most folk are not listening.
***
BUT Amazon web site uses lots of different sized "Thumbnails" and these are NOT Scaled but are Resized [using a script or macro] from the image you uploaded. You can see that via right click and Properties. By Resizing, search pages and the like come up instantly because of the small file sizes.

But once we get to Kindle html, the author has no say at all in scaling, ie the width/height attributes in html code DO NOT WORK. Of course there is very good reason for that as it allows the Kindle "browsers" to scale [usually down but sometimes up] in order to make images fit pages in an orderly [flowing] manner. This behavior even differs from device to device.

But just recently we noticed what appears to be a new Scaling feature to remove those nasty white spaces when an image does not fit under text at the top of a page. Please observe this photo with page break before it.





This is displayed at about full size [images are all 400 wide] on Kindle for PC and any text under it would be moved to the next page.  And vice versa WAS the case if there were say 2 lines of text at TOP of page, ie image would be moved to next page.

But now look at this image

With about one third of the page being used for text, Kindle has decided to Scale the image [to about 66%] to KEEP it on the page.

Then when we thought that must be the end of Scaling, please observe this situation.

So text was taking up more than HALF the page but Kindle decided to Scale our image down to about 50%.

As you can see this was not what we wanted as the text we layered ON the image could not be read.  Therefore as Amazon gets more and more clever with its browser algorithms, authors will need to properly proof their books [as an actual azw file, not the nasty Preview at upload] and use page breaks in order to prevent such Scaling.  In this case we were happy to go with image scaled to 66% even though it was smaller than the others, but the 50% Scaled image was not acceptable.