Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uncrop plug-in - resynthesizer
#1
After using the uncrop plug-in, part of the resynthesizer suite for many years, today I discovered an error! If it used on a layer with an alpha channel it will fail.

So I have modified it to remove the alpha channel. I have also done the same for my variant - uncrop side.

I attach the two modified files. (Linux users will need to make them executable.)

[attachment=8357]



.zip   plugin-uncrop-side.zip (Size: 2.68 KB / Downloads: 24)
Reply
#2
IMHO this isn't not an adequate fix. The image is uncropped OK but the alpha channel is extended with black instead of being extended with ones.
Reply
#3
@Ofnuts,

Apologies, I fail to understand your reply. Could you please supply more detail.
Reply
#4
(07-20-2022, 03:58 PM)david Wrote: @Ofnuts,

Apologies, I fail to understand your reply. Could you please supply more detail.

If you look at the alpha channel of the uncropped image (for instance by adding  alayer mask), you see that that the added pixels are transparent (black rim around the mask):

   

But if you make these pixels opaque, they contain the uncropped image:

   

So instead of blindly deleting the alpha channel its rim could just be filled with white.

PS:  check your PMs
Reply
#5
(07-20-2022, 05:09 PM)Ofnuts Wrote: If you look at the alpha channel of the uncropped image (for instance by adding  alayer mask), you see that that the added pixels are transparent (black rim around the mask):
But if you make these pixels opaque, they contain the uncropped image:
So instead of blindly deleting the alpha channel its rim could just be filled with white.

I would say don't run Uncrop, just delete the mask Big Grin
More seriously, I did a try with a mask (with the script I already have) even if the image is selected (not the mask) the script work on the mask, adding more black on the mask thus more transparency.

I did a read about the author's comment in the source, and what I understood is that the plugin was never meant to work to "uncrop", for sure I might be wrong.
The author called it uncrop, but it should have been called "Enlarge", OK this very arguable

In the source
Quote:6 Increase image/canvas size and synthesize outer band from edge of original.

31 The effect for users:
32 widens the field of view, maintaining perspective of original

142 N_("Enlarge image by synthesizing a border that matches the edge, maintaining perspective. Works best for small enlargement of natural edges. Undo a Crop instead, if possible! "),

The only reference for a crop is "Undo a Crop instead, if possible!", everything else is just about enlarging an image by adding resynthesized borders.
Did I misunderstand?
Reply
#6
(07-21-2022, 01:25 AM)PixLab Wrote: I would say don't run Uncrop, just delete the mask  Big Grin

No, because if the layer has "holes", the layer is uncropped but the holes are left in. So by amending the mask you get the uncropped images with the holes, while by deleting the mask you lose the holes.
Reply
#7
@Ofnuts,

Thank you for your advice and removing the modified uncrop script.

The uncrop_side program I find useful when I require to synthesize extra space in an image. When I have corrected the image offsets I will change it to fill the mask border with white.

The comments in your PM are duly noted and will be followed.
Reply
#8
I have modified the script, filling the mask with white (thanks Offnuts!!!) and in now works OK when there is an alpha channel.

Here is the modified script.


.zip   plugin-uncrop-side.zip (Size: 2.31 KB / Downloads: 11)
Reply


Forum Jump: