Searge-DP / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Incorrect Resize Transformation #435

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
In the transform menu, resize the image with a ratio of 3 in X and Y.

What is the expected output? What do you see instead?
All of the pixels should now be 3x3 pixel squares. Instead, the pixels are 
enlarged to inconsistently shaped rectangles, which is especially noticeable at 
the borders.

What version of GrafX2 are you using? On what operating system?
Grafx2 version 2.3
Running on Ubuntu 10.10
Please provide any additional information below.

OpSys-Ubuntu

Original issue reported on code.google.com by erdav...@gmail.com on 20 Apr 2011 at 6:43

GoogleCodeExporter commented 8 years ago
I checked the code against possible overflows or 64bit problems, and all I can 
see that could explain this behavior is when a resized dimension exceeds 9999, 
the program clips it to 9999 pixels.
If this is not your case, can you tell us which dimensions is the image before 
and after resize?

Original comment by yrizoud on 20 Apr 2011 at 8:45

GoogleCodeExporter commented 8 years ago
Hmm, my image was only 16x16 pixels. I forgot to mention, I am running on a 
64-bit machine.

Here is the image, before and after resize:

Original comment by erdav...@gmail.com on 20 Apr 2011 at 10:26

Attachments:

GoogleCodeExporter commented 8 years ago
You're right, need to fix some rounding in the scaling algorithm. (It also 
happens on 32bit machine) I think we re-used the "brush transform" algorithm 
when implementing image transformation, so the bug may be present there too.

Original comment by yrizoud on 21 Apr 2011 at 8:12

GoogleCodeExporter commented 8 years ago
Fixed in r1824.

Original comment by pulkoma...@gmail.com on 24 Sep 2011 at 1:15