"Rotate image" causes degradation - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions) +--- Thread: "Rotate image" causes degradation (/Thread-Rotate-image-causes-degradation) |
"Rotate image" causes degradation - rickk - 01-13-2021 I stumbled into this issue through a series of improbable events. While trying to edit a map that was 5300 pixels x 2200 pixels (approx 11 MB file size), I was having real problems with "jaggies" when drawing straight lines using the pencil tool in conjunction with the [shift] key, anytime I was drawing a line outside of strict 0-90-180-270 degree coordinates. (reading elsewhere here I've already discovered that my main problem was that I was too stupid to realize that the pencil tool does not anti-alias, so I switched to the brush tool, and that problem is now solved).I may end up preferring the "stroke path" function....once I get more experience with it. ANYWAY, before I came here and got a workable solution, I was trying to improvise a solution. Initially, it seemed to make perfect sense to me to just use the transform/rotate image function, and rotate the entire image to the position needed to draw the line straight at 90/180/270 degrees with the pencil tool. And it worked, giving me nice, crisp lines at whatever angle I set up for. But, I needed to draw 50+ lines, oriented at least a dozen different rotational positions. Waiting for an image of that size to rotate, got to be a chore in itself, especially given the number of times I needed to set up differently. But it seemed to be working, until I got to my 5th distinct rotation, and I noticed that the (original) text on the map was starting to get blurry. (note: using *.PNG image format) Evidently there is some loss of information that accompanies each rotation? I've rotated images in the past and never really noticed degradation of the image before. Are you folks who are familiar with the code aware of why this might be happening? Is there a setting available that can "sharpen the pencil" that the program uses to calculate the rotations? (such as the Image/precision list box selector) not sure if that is the intent, or not. Just curious if this is the intent and function of the "precision" selector. Doubtful that I'll ever try this again for the purpose of beating the anti-alias demons, but I do occasionally rotate images for legitimate purposes, so it would be nice to know if there is a fix available. Thank you in advance for your patience in addressing this unusual request. Gimp 2.10 RE: "Rotate image" causes degradation - Ofnuts - 01-14-2021 Yes. When you rotate the image by anything but a multiple of 90°, there is no one-to-one correspondence between the pixels before the rotation and pixels after. So the pixels "after" are interpolated using the pixels "near" their original theotical position (which straddles several pixels). So there is a slight loss each time, not too visible on the first iteration, but more and more visible as you accumulate iterations. There is no fix for this, this is a well-known restriction of the bitmap editing. The best you can do is making sure that you are using the "NoHalo" interpolation. But you shouldn't be needing to do this. If you want to draw lines at multiples of 15° can you can use "constrained angles": click to mark origin, depress Shift to put the brush in "straight line" mode, and then depress "Ctrl" to force the straight line on 15° marks, then move to your target end and click again. For sharp lines, an even better technique is to create a path with several lines, and then stroke the path in "Line" mode. RE: "Rotate image" causes degradation - denzjos - 01-14-2021 If I have this problem, and I can't make a new part of a drawing as Ofnuts mentioned, then I try to fix the result with : Filters / Enhance / Sharpen Or copy the layer, set the layer mode on 'Multiply', and if needed, use the 'Sharpen' filter. It's only a suggestion. RE: "Rotate image" causes degradation - rickk - 01-14-2021 (01-14-2021, 01:32 AM)Ofnuts Wrote: For sharp lines, an even better technique is to create a path with several lines, and then stroke the path in "Line" mode. Ofnuts, your help is always appreciated! Yes, the image corruption that occurs with (only) a single rotation is so small as to be unnoticeable. Which I guess is all that was ever intended, Works fine for that purpose. And I'll just leave it at that. My crazy idea to rotate an image multiple times to accomplish an unorthodox goal, is an experience I will gladly leave in the scrap pile. Funny, but over the many years...."paths" were one thing that I always seemed to shy away from. Being so robust a function as it is, whenever I'd start reading up on them it always seemed like the concept was more involved than I had time to invest in reading up on. So I just found more expedient means to accomplish whatever task I had to accomplish at the moment, and resolved that "some day" I will focus on learning "paths". And then many years just slipped on by. Regarding the "raster vs vector" dilemma, it always seemed like a shame to me that an incredible program such as gimp, couldn't have a plugin of some sort that would allow the artist to "bust the grid" and draw Inkscape style. So, in just these past couple days....it's been quite an eye opener for me, finally reading-in on "paths", and how to use them. I think that I'm gonna take advantage of the pandemic induced isolation, and learn more about paths. On a side note, I've often used the "rotate" function to create layers for gif animations.....creating pane #3 from pane #2....and creating pane #4 from pane #3......etc etc. Being now aware of the corruption we discussed above, I think I will from this point forward insist upon using pane #1 as the source for all the sequential layers. Just out of an abundance of caution. |