Thanks for all that great info, Joe! I'm trying to create an HTML for other people to download, so I really don't have any browser-related flexibility. I'll check on the scaling, and if necessary fix the HTML. I can probably live without the lines in most cases, but in the screen shots for one app it really looks weird (there's a regular grid that ends up looking "plaid").
From what you've said, I think I see how to fix this. Fortunately, all these
screen shots should be the same size, so I'll probably be able to use a global search-and-replace. Again, thanks!

----- Original Message ----- From: "Joe Smith" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, January 27, 2007 12:15 PM
Subject: [users] Re: HTML Save Uses Lossy Compression of Graphics


Barbara Duprey wrote:
(OOo 2.0.4, WinXP) When I save a document as HTML, the compreesions
to create PNG images ...  are too lossy to pick up a lot of the lines in
screenshots. ...

As far as I can tell, png or jpeg images are stored in the .odt without change, and when you "Save As" HTML, the images are saved without change as well (except for the file names).

However, the exported html code specifies that the images should be scaled to a specific size (the size in the Writer window maybe?). The browser is required to scale the image to whatever size is given in the html file. This scaling is what is causing the problem.

Here's an example: I inserted a png and a jpeg image in a Writer document and saved it as .odt and as HTML. Here are the sizes of the original and the exported image files:

Original files:
-rw-rw-r-- 1 jes jes 1213759 Sep 22 13:08 Cydonia_H.jpg
-rw-rw-r-- 1 jes jes  448672 May  7  2006 Anatolia.png

Export from Writer to HTML:
-rw-rw-r-- 1 jes jes 1213759 Jan 27 12:32 cydonia_html_74d185d9.jpg
-rw-rw-r-- 1 jes jes  448672 Jan 27 12:32 cydonia_html_2d5ceca5.png

And the dimensions of the jpeg (original/html exported):
            Cydonia_H.jpg JPEG 3670x2480 DirectClass 1.2mb 1.580u 0:03
cydonia_html_74d185d9.jpg JPEG 3670x2480 DirectClass 1.2mb 1.570u 0:03

All the same.

But in the HTML:
<IMG SRC="cydonia_html_74d185d9.jpg" NAME="graphics1" ALIGN=LEFT WIDTH=665 HEIGHT=449 BORDER=0>

The size is specified as 665x449, so the browser scales the image down from it's original size. This scaling is where your view is degraded.

If you use a Mozilla browser (Seamonkey or Firefox), you can view any image in a web page at full resolution. Open the exported html file and right click on the screenshot and select "View Image". This will open the image file itself in a new window. Firefox will scale the image to fit in it's window, but if you now click the image again, it is displayed at full size.

If you need to "fix" the problem, you'll have to edit the html to change the size specification back to the original dimensions. Writer will not allow a picture to be larger than the page, and I don't see any way to tell it what dpi to use for the image.

Alternatively, if you can crop the screenshot to a smaller size, Writer won't need to scale it and the HTML should also be full size.

You can see if Writer is scaling a picture by right-clicking on the image > Picture > Crop. This tab will display all the size and scaling info about the image.

HTH

<Joe

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to