imagemagick ですべてのサムネイルにドロップ シャドウを適用して、ペーパークリップのサムネイルの処理を変更したいと思います。私が立ち往生しているのは、この小さな奇跡を実現する実際の imagemagick コマンドです。私が試したことはすべて、元の画像なしで誤ってスケーリングされたドロップ シャドウを返します。
def transformation_command
scale, crop = @current_geometry.transformation_to(@target_geometry, crop?)
trans = ""
trans << " -resize \"#{scale}\""
trans << " -crop \"#{crop}\" +repage" if crop
# Apply Drop Shadow
trans << " #{convert_options}" if convert_options?
trans
end
私が試したもの...
def transformation_command
scale, crop = @current_geometry.transformation_to(@target_geometry, crop?)
trans = ""
trans << " -resize \"#{scale}\""
trans << " -crop \"#{crop}\" +repage" if crop
trans << " \( +clone -background black -shadow 60x5+10+10 \) +swap -background none -layers merge +repage"
trans << " #{convert_options}" if convert_options?
trans
end
私はimagemagickにまったく慣れていません。どんな助けでも大歓迎です。