iPhone shine effect

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
jdespatis
Posts: 9
Joined: 2011-06-24T06:17:57-07:00
Authentication code: 8675308

iPhone shine effect

Post by jdespatis »

Hello,

I'd like to apply an effect to my image, in order to get the appearance of any logo on an iPhone

I've seen this post, but it doesn't give effective IM parameters to do so:
viewtopic.php?f=1&t=13140&p=44154&hilit ... ect#p44154

Anyone has an idea on how to do ?

Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: iPhone shine effect

Post by fmw42 »

Here is a go at it. The first two images are from the referenced page.

Image

Image

And here is my simulation:

convert logo_no_shine.jpg \
\( +clone -channel a -separate +channel -negate \
\( -size 30x30 xc:black -draw 'fill white circle 30,30 30,0' -write mpr:arc +delete \) \
\( mpr:arc \) -gravity northwest -composite \
\( mpr:arc -flip \) -gravity southwest -composite \
\( mpr:arc -flop \) -gravity northeast -composite \
\( mpr:arc -rotate 180 \) -gravity southeast -composite \) \
-alpha off -compose CopyOpacity -composite -compose over \
\( -clone 0 -fill black -colorize 100 -fill white \
-draw "translate 100,-300 circle 0,0 0,400" \
-size 200x200 gradient: -compose multiply -composite \
+duplicate -alpha off -compose copy_opacity -composite \) \
-compose dissolve -define compose:args=80,100 -composite -compose over \
-background white -flatten logo_im_shine.jpg


The first 8 lines rounds the corners and the remaining lines creates the shine

Image
jdespatis
Posts: 9
Joined: 2011-06-24T06:17:57-07:00
Authentication code: 8675308

Re: iPhone shine effect

Post by jdespatis »

Thanks for this code!

And by sheer chance, have you an idea to add the border (we can see it on the reference image) ?
Post Reply