Post Reply 

Image scaling asymmetry

Apr 21, 2012, 14:02 (This post was last modified: Apr 21, 2012 14:09 by spiderplant0.)
Post: #1
Image scaling asymmetry
Hi, When I shrink an image, the result seems to be distorted.

I have an image 850x850.
I go: Menu > Image > Scale Image > and set height and width to 306 px
I get the same error no matter what scaling algorithm I use.

See images below, the one scaled by the GIMP has the black circle noticeable shifted to the right hand side. The white gap between the red and the black circles is 6 px on the LHS and it is 3 px on the RHS (measured at the widest part of the circles) . To compare, I have also scaled the image using another image manipulation program (IrfanView) - it scales it properly.

scaled by the GIMP....
   

scaled by Irfanview...
   

Is there any setting that you think I may have set incorrectly to get this problem?
(Under the View menu, I dont have any "snap to..." checked.)

The test source file is the scaleBug.xcf attachment.

I'm on GIMP 2.6.11, Windows 7 64bit.

Thanks.


Attached File(s)
.xcf  scaleBug.xcf (Size: 72.43 KB / Downloads: 27)
Find all posts by this user
Quote this message in a reply
Apr 21, 2012, 17:27
Post: #2
RE: Image scaling asymmetry
1) Your various items aren't really centered (they aren't even good circles)
2) When you scale the image in Gimp, Gimp scales each layer independently. Round off can occur either way.
3) To scale with IrfanView, I assume you exported to PNG first, thus flattening the image to one single layer, so Irfanview applied the very same transform to all pixels.

However, if I produce proper centered circles (using path produced by the highly recommended shape-paths script)(*), I still get perfectly centered circles when scaled down. See attached XCF for the paths and the circles produced with them. I'll let you scale it down yourself.

(*) if you are working on geometric shapes like this you are of course using paths. If you are not, learn how to...

Now answering your questions on
https://Gimp-Forum.net
Visit this user's website Find all posts by this user
Quote this message in a reply
Apr 21, 2012, 20:05
Post: #3
RE: Image scaling asymmetry
Thanks ofnuts.
The artefact was indeed caused by the multiple layers - I merged all layers , then scaled and it worked fine.

Also, just to explain my test image....
1) The quality of the circles and the centring is not relevant here. This was just an example to show the bug. I was getting the misalignment in arbitrary shapes. The circles just made it easier to see the misalignment.
2) The error in placement is 3px! So a shift error of 1.5px. An inevitable consequence of rounding? Hardly.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  XCF Thumbnail/Preview Image DailyLunatic 6 3,681 Yesterday 11:46
Last Post: paynekj
  Image centering for printing okfhp 1 230 Aug 23, 2017 17:51
Last Post: ofnuts
  "Open Image" change default folder and thumbnail view? Dave001 1 176 Aug 15, 2017 19:56
Last Post: ofnuts
  Scaling and Canvass Size maicart 1 147 Aug 15, 2017 10:30
Last Post: paynekj
  How to wrap paragraph text in an image arun67 0 153 Aug 12, 2017 12:46
Last Post: arun67

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS