ruby on rails - How do I apply a drop shadow to thumbnails using imagemagick and paperclip? -
I would like to change the processing of thumbnails in Pemelclip, which will apply a drop-side to all image thumbnails. What I am stuck is the real image magnetic command that will close this small miracle. Whatever I have tried, it returns a wrongly scaled drop shadow without the original image.
DF Transformation_anomic scale, crop = current_jammetry.transivation_to (target_geometry, crop?) Trans = "" trans & lt; & Lt; "-Resage \" # {scale} \ "" trans & lt; & Lt; "-crop \" # crop) \ "+ repape" if crop # drop shadow transpole apply & lt; & Lt; "# {Convert_options}" If Convert_section? I have tried ...
DF Transformation_ Size scale, crop = current_jammetry.transensfarm_to (@ target_gementory, crop) trans = "" Trans & lt; & Lt; "-Resage \" # {scale} \ "" trans & lt; & Lt; "-Crop \" # {crop} \ "+ repep" if crop trance; & Lt; & Lt; "\ (+ Clone-background black-side 60x5 + 10 + 10 \) + swap-background no-none merge player +" trans & lt; & Lt; "# {Convert_options}" If Convert_section? Transamat end
I'm totally new to Image Magazine, any help would be greatly appreciated.
After some trial and error and after burying my head in the docks, I finally thought Was there.
has_attached_file: image ,: styles = & gt; {: Thumb = & gt; ["100x100 #" ,: png]},: convert_pipation => {: Thumb = & gt; '\ (+ Clone-background black-analogy 70x4 + 0 + 0 \) + Do not mix any players of swap-background + repage'}
- Make sure you have Install the latest version of Image Magic.
- ["100x100 #", png] The image must be converted to png so that the drop side is transparent.
- Under the convert options, thumbs will apply only to apply the conversion of all your styles: use the thumb style.
- Tap "70x4 + 0 + 0" to get the shade you want.
Comments
Post a Comment