PNG file manipulation
Posted: 2019-05-20T12:15:15-07:00
I need to take a single PNG file, tile it 3x3 and then save it out, preserving the alpha channel.
I have worked my way to the following command:
montage original_file*.png -tile 3x3 -alpha set -geometry +0+0 tiled_file.png
montage sucks because it requires I have 9 identical files in the working directory, so my script generates them and then deletes them after the montage command. I tried to use the convert command in place of montage, which does not require multiple files to tile, but it was not handling the alpha channel properly. (convert -size {$newXresolution}x{$newYresolution} tile:original_file.png tiled_file.png) where the new resolutions are 3X the originals.
This montage command creates what I need, but when I compare the original file to the output file, the alpha channel starts off as 8-bit, but the output file shows it as 1-bit.
Is there a way to tell montage to keep all image parameters the same as the original file... especially the alpha channel settings? I tried saving using the PNG8:, PNG16, etc but this did not help.
Version of IM I am using: Version: ImageMagick 6.9.10-11 Q16 x86_64 2018-09-08
Any help is appreciated,
Chris
Austin, TX
I have worked my way to the following command:
montage original_file*.png -tile 3x3 -alpha set -geometry +0+0 tiled_file.png
montage sucks because it requires I have 9 identical files in the working directory, so my script generates them and then deletes them after the montage command. I tried to use the convert command in place of montage, which does not require multiple files to tile, but it was not handling the alpha channel properly. (convert -size {$newXresolution}x{$newYresolution} tile:original_file.png tiled_file.png) where the new resolutions are 3X the originals.
This montage command creates what I need, but when I compare the original file to the output file, the alpha channel starts off as 8-bit, but the output file shows it as 1-bit.
Is there a way to tell montage to keep all image parameters the same as the original file... especially the alpha channel settings? I tried saving using the PNG8:, PNG16, etc but this did not help.
Version of IM I am using: Version: ImageMagick 6.9.10-11 Q16 x86_64 2018-09-08
Any help is appreciated,
Chris
Austin, TX