unshred layer - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +--- Thread: unshred layer (/Thread-unshred-layer) Pages:
1
2
|
RE: unshred layer - DearDeparted - 05-01-2023 Thanks a lot for your explanation!!! I'm now trying to find a way to quickly find out what the strip and space pixel width is.
RE: unshred layer - Ofnuts - 05-01-2023
RE: unshred layer - DearDeparted - 05-01-2023 (05-01-2023, 05:36 PM)Ofnuts Wrote: Thanks a lot!!! For me it doesn't matter if you use the same code (I'm not a developer so I can't read code anyway ) as the normal script or some other way (that's easier/better). Only the result counts. I was also wondering if you know if it's possible in GIMP to load several images (for example a whole folder of images) and then run your script (or other scripts) on each of the images, while the output of the script is saved as image too? Is there some plugin/script that can do this? So a sort of batch processing of scripts on images? Would you be so kind to have a look at this file I want to unshred vertically (and horizontally too, later)? https://we.tl/t-h1tNEPHP9d I used the measure tool and found the strips as 18px, the spaces 2px So the calculation is 26 * 18 + 25 * 2 = 518 But for some reason the image is 530px in width?!? So I don't understand how that's possible. There is nothing at the left or the right so where do the extra pixels come from? I'm struggling with this now RE: unshred layer - Ofnuts - 05-03-2023 Using your image to test my script, i find it strange. The squares are blurry, it looks like it was enlarged by some non-integer scale factor... Even manually I would have trouble getting a clean output from this. RE: unshred layer - rich2005 - 05-04-2023 Quote:..So the calculation is 26 * 18 + 25 * 2 = 518 The left and right end columns are 19 pix wide which accounts for an extra two pixels If you set a 20x20 grid up you find the spacing is not uniform, on that basis the uncrop plugin is not going to work. [attachment=9756] I can get a poor result using a liquid-rescale plugin, but some preparation is required to make a suitable mask and still not 100% [attachment=9757] Looks to me like the original was for pixel art, probably an indexed colour image. Maybe copied as a screenshot, hence the anti-aliasing as a RGB image RE: unshred layer - rich2005 - 05-04-2023 Dear departed I never seem to make things easy, using the liquid-rescale plugin is certainly a hard way. It is because I have been using Gimp for a long time. This using standard Gimp. For your image test2.xcf (1) You can remove any anti-aliasing with a very big value (0.99) in Layer -> Transparency -> Theshhold Alpha (2) Apply Image -> Zealous Crop which removes unused space. 30 second example: https://i.imgur.com/QXkAgvR.mp4 |