我想通過讓imagemagick將陰影應用於所有縮略圖來改變回形針中縮略圖的處理。我所堅持的是實際的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的,任何幫助將不勝感激。