Issue 88830 - Imported image changes size on export
Summary: Imported image changes size on export
Status: CONFIRMED
Alias: None
Product: Draw
Classification: Application
Component: save-export (show other issues)
Version: OOo 2.4.0
Hardware: All All
: P3 Trivial (vote)
Target Milestone: AOO Later
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-29 09:40 UTC by mikeymike
Modified: 2013-01-29 21:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Original sample file I'm using for test (308.62 KB, image/jpeg)
2008-05-09 16:14 UTC, mikeymike
no flags Details
Draw file with original jpeg imported (42.02 KB, application/vnd.oasis.opendocument.graphics)
2008-05-09 16:18 UTC, mikeymike
no flags Details
First exported jpeg, no alterations to image, no problems here (302.66 KB, image/jpeg)
2008-05-09 16:21 UTC, mikeymike
no flags Details
Second export with box on top of image - significant increase in file size and pixel dimensions (460.28 KB, image/jpeg)
2008-05-09 16:23 UTC, mikeymike
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description mikeymike 2008-04-29 09:40:29 UTC
I imported a digital camera photo, with the pixel dimensions of 1760x1168 into
Draw (win32).  I wanted to add a caption to it, so I drew a square completely
inside of the photo and labelled the square.  I then exported the selection
(image and caption box) to JPEG.  The image's dimensions had shrunk to 1048x696.

If I do this experiment on an A3 page, the image's export dimensions change to
1513x1004.  From an A0 page, 2348x1558.

If I don't add the box first (nothing needs to be in the box, just draw a box in
the image), the image size doesn't change on export.
Comment 1 wolframgarten 2008-05-05 14:50:46 UTC
Do you extend the inserted image to original size (context menu ) after
inserting it?
Comment 2 mikeymike 2008-05-09 16:12:17 UTC
I haven't been doing that, but it makes no difference if I do that on an A0 page
as the image size has not been altered during import.

Exact steps:

Start Draw (2.4 or 3.0b releases / win32 - PS I've only just installed 3.0b, it
wasn't installed at the time of posting this issue)
Page setup > Alter to A0 landscape
Import image from file (I'll attach a sample image that I've been using for the
test - the image's dimensions are 1760x1168)

- whether you want to right-click on the image and select 'original size' at
this point is up to you, it won't make any visible difference to the size of the
image - 

Select image
File > Export.  Tick 'selection', specify JPEG (I haven't tried any other file
types), give it a name and save it.  Quality setting on default is fine.

Open exported image in a graphics program, check pixel size, it still should be
1760x1168 (the size of the original).  All good.  Comparing file sizes shows a
difference of about 6KB, fine by me, probably the JPEG compression ratios are
different.

Now, go back to Draw, add a box inside that image, select all, export JPEG
selection as before to another file, and open that in your graphics program of
choice - the image size has increased.

I've just spotted something new btw - I started with a new Draw file, A0
landscape page again, and imported the file that I exported the first time
round, the file that is identical in pixel dimensions to the original JPEG.  The
image size on the page looks smaller than the original, and if I put the
original import alongside it, there definitely is about a 33% size difference. 
But just to make things really confusing now, if I re-export the 'seemingly
smaller' image, it comes out the original size in pixels.

I'll post a few attachments to better describe the behaviour I am seeing here.
Comment 3 mikeymike 2008-05-09 16:14:56 UTC
Created attachment 53511 [details]
Original sample file I'm using for test
Comment 4 mikeymike 2008-05-09 16:18:23 UTC
Created attachment 53512 [details]
Draw file with original jpeg imported
Comment 5 mikeymike 2008-05-09 16:21:41 UTC
Created attachment 53513 [details]
First exported jpeg, no alterations to image, no problems here
Comment 6 mikeymike 2008-05-09 16:23:48 UTC
Created attachment 53514 [details]
Second export with box on top of image - significant increase in file size and pixel dimensions
Comment 7 mikeymike 2008-05-09 16:27:42 UTC
Ignore the draw file, judging by the file size it only has the image linked, it
may as well be deleted.

During the process of creating those attachments, I tried reversing the routines
I was using to create the files, and removing the box from the image would
result in a properly exported image.  Also I found that using options in the
image's "position and size" to protect the image position and size made no
difference to this issue.
Comment 8 wolframgarten 2008-06-18 10:06:31 UTC
Very good and explicit description, thanks.
Reproducible. Reassigned.