#5 Preserve image display size

open
nobody
None
5
2008-03-25
2008-03-25
No

I think that it should be possible to preserve the image scale when converting to DTBook. Right now, the original size is preserved, i.e. the number of pixels is the same as in the original.

An image intended for print publishing displayed at 96 dpi resolution without scaling is too big. Therefore, I would like an option to preserve the image display size. This way the image will look (approximately) the same in DTBook as it did in Word; either using the width and height attributes or by re-sampling the image using 72/96/120 dpi at 100%.

Image options:
1. Use original image
2. Scale original image using 72/96/120 dpi
3. Resample image using 72/96/120 dpi

Example 1:
An 1000x1000 pixels image at 72 dpi resolution is inserted into a word document and scaled to 25%.

Output of 1:
1000x1000 pixels. <img src="..." alt=""/>

Output of 2 using 72 dpi:
1000x1000 pixels . <img src="..." alt="" width="25%" height="25%"/>

Output of 3 using 72 dpi:
250x250 pixles. <img src="..." alt=""/>

Example 2:
An 900x900 pixels image at 300 dpi resolution is inserted into a word document.

Output of 1:
900x900 pixels. <img src="..." alt=""/>

Output of 2 using 96 dpi:
900x900 pixels. <img src="..." alt="" width="32%" height="32%"/>

Output of 3 using 96 dpi:
288x288 pixles. <img src="..." alt=""/>

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Hi Joel

    I am looking at this requirement. Can you elaborate the examples you provided.

    Do you think we need to provide a user interface where user could enter the DPI, Scale% or width/Height

    Please provide more details on the requirements to get the proper understanding.

    Thanx
    -Senthil

     
  • Joel Håkansson

    Joel Håkansson - 2008-07-11

    Logged In: YES
    user_id=1253117
    Originator: YES

    Hi Senthil,

    I think that a radio group with these three options allow sufficient user control:
    1. Use original image
    2. Scale original image
    3. Resample image

    * DPI should match whatever the user has chosen in the "Save as..." dialog under Web options/Pictures. If this isn't possible, assume 96 dpi.
    * The width/height scale factor is determined by analysing the properties of each image object (in Word), i.e. it is calculated by the software - the user does not know the correct values.

    Option 1. represents the current implementation. The objective of item 2 and 3 is to match the display size (or print size, if you will) in Word with the one in the browser.
    Option 2 achieves this by using the width and height attribute of the img-tag.
    Option 3 achieves this by resampling the image (same functionality as in "export as HTML")

    Best,
    Joel

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks