splitcrop and transparency
Posted: 2013-04-22T03:47:31-07:00
Hello,
I want to crop an image into a mosaic of many tiles of the same size. My problem is when a tile exceeds the width (or the height) of the image of origin, I want the tile to be completed with transparency (preserving the fixed size).
Up to now i use the method 'excerpt'. For exemple the code below:
This code return a tile of 256x256 but fill the unknown pixels with the same as those of the edge of the image. I want the unknown pixels to be transparent.
What is the best way to do this?
Thx (and sorry if my english isn't right)
I want to crop an image into a mosaic of many tiles of the same size. My problem is when a tile exceeds the width (or the height) of the image of origin, I want the tile to be completed with transparency (preserving the fixed size).
Up to now i use the method 'excerpt'. For exemple the code below:
Code: Select all
image.excerpt(-20,-75,256,256)
What is the best way to do this?
Thx (and sorry if my english isn't right)