Imported PNG distorted

Post questions on how to use or achieve an effect in Inkscape.
User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Imported PNG distorted

Postby Bucic » Tue Feb 23, 2010 6:04 am

Some PNG images I import to inkscape appear distorted.
I tried to start doing YouTube channel background template so I took some screenshots of my channel and imported them to Inkscape. Two out of four are "broken" from certain height to the bottom.

Edit:
It appears that photobucket modifies my files (the file size changes), so I uploaded it to RS

http://rapidshare.com/files/354370180/y_tr_2.png
http://rs673tg2.rapidshare.com/files/35 ... y1aabb.png
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

User avatar
Grobe
Posts: 411
Joined: Tue Feb 02, 2010 2:20 am

Re: Imported PNG distorted

Postby Grobe » Tue Feb 23, 2010 7:04 am

Use tinypic instead. Following your link only tell me to pay money. No pictures there :x
:lol:

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: Imported PNG distorted

Postby Bucic » Tue Feb 23, 2010 7:19 am

The rapidshare links should be fine.
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

User avatar
syllie
Posts: 48
Joined: Fri Jan 15, 2010 3:51 pm
Location: Sydney, Australia
Contact:

Re: Imported PNG distorted

Postby syllie » Tue Feb 23, 2010 11:51 am

Hi Bucic,

I downloaded the pics, and I had a look at them, but as they have no annotations, I am not sure what your problem is exactly.

What you do need to know however is that Inkscape works internally with a 90dpi setting for resolution.
So any image that is imported into Inkscape and uses a different resolution, will end up in a different image size. This is addressed in the FAQ:
http://wiki.inkscape.org/wiki/index.php/FAQ#Why_do_images_.27grow.27_when_imported_into_Inkscape.3F

Why do images 'grow' when imported into Inkscape?

There is a limitation in the way Inkscape imports raster/bitmap images (e.g JPEG, PNG, TIFF images): it cannot read the image resolution. Inkscape assumes a 1-to-1 relation at 90dpi, so any imported image with a different resolution will appear to be scaled. For example, an image of resolution 180 dpi, when imported into Inkscape, will appear twice as big (180 = 90 x 2) in absolute units as it is in other programs. Note that this just scales the pixels of the image, but never adds or removes any pixels.

When exporting back to a PNG image, changing the resolution will only resample the image, not resize it. The only way to keep the image at the same size is to scale it inside Inkscape, once it is imported. For this you need to know the size (in pixels, cm, inches,...) of the image you import. Then select it and in the selector's toolbar, click the lock between the width and height fields, select the unit of the image size and enter either the width or height in the appropriate field. When exporting, if you don't want to lose information from your image, use a resolution larger or equal to the resolution of the original image.

Example: Import an image of size 800*600 pixels and resolution 150 dpi. It will appear to be 1333 pixels wide and 1000 pixels high in Inkscape. Select it, click the lock in the selector's toolbar, enter 800 in the width field. Add some stuff on the image. Export the document to PNG with resolution 150 dpi. The exported image will be identical to the original one expect for the stuff you added on it.


I hope this addresses your problem and provides some help.
If not, try to be more specific to what exactly happens and if possible used some annotations to indicate the problem on the uploaded pics.

Cheers,
Syllie
Life is the art of drawing without an eraser. (John W. Gardner)

http://verysimpledesigns.com - graphics resources
http://syllie.com - personal website

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: Imported PNG distorted

Postby Bucic » Tue Feb 23, 2010 2:15 pm

It was not helpful at this point :) This is how one of the images look like

Image
Last edited by Bucic on Tue Feb 23, 2010 3:55 pm, edited 1 time in total.
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l

User avatar
syllie
Posts: 48
Joined: Fri Jan 15, 2010 3:51 pm
Location: Sydney, Australia
Contact:

Re: Imported PNG distorted

Postby syllie » Tue Feb 23, 2010 3:05 pm

Hi Bucic,

That picture was a lot better in visualizing the problem :)
Sad news is that it apparently is a (known) bug: https://bugs.launchpad.net/inkscape/+bug/168386

Have a look at the comments, some people have correctly imported pictures by reducing the compression level.

I suggest that you upload your file to the bug report, add relevant details (Inkscape version, OS) and click the "the bug affects me" button on top.

I am sorry that I cannot be more helpful.

Cheers,
Syllie
Life is the art of drawing without an eraser. (John W. Gardner)

http://verysimpledesigns.com - graphics resources
http://syllie.com - personal website

User avatar
Bucic
Posts: 128
Joined: Fri Apr 24, 2009 2:50 am
Location: Poland

Re: Imported PNG distorted

Postby Bucic » Tue Feb 23, 2010 3:54 pm

I bet it was :)
Bug report - maybe later... Thanks for the tip - it worked! I re-saved my PNGs with compression level 6 instead of 9.

Thank you.
!!! Support wishlist: A new perspective / transformation tool http://tinyurl.com/3uacua4
* Inkscape Tutorial Basics A different approach... http://tinyurl.com/3pextp3
* What do I use Inkscape for http://tinyurl.com/3pbna6l


Return to “Help with using Inkscape”