Understanding ImageMagick's convert and translating to Ruby RMagick

前端 未结 5 1520
暗喜
暗喜 2021-01-13 15:06

I\'m failing at translating the following PHP/ImageMagick code into Ruby RMagick (to make it more manageable for future users and to understand what it\'s really doing):

5条回答
  •  滥情空心
    2021-01-13 15:57

    The php code you show (which really just sends the work to convert in a shell) does not check to see if the images have alpha channels, it just takes whatever file is given and turns it on. If it already had one there would be no file change, but convert is not being asked to make any decision based on the status, just go ahead and add the channel.

提交回复
热议问题