Page 1 of 1

Rounding and Image

Posted: Wed Mar 13, 2013 12:34 am
by KennyR
I hate to ask this question on multiple threads but I think this question is best suited for here....Question...After I create a template image and import a photo from lets say a mobile gallery, is there a way to make the image have rounded corners? After importing the image, it's original shape (that of a rectangle or square) looks generic and I would like to have it rounded in order to give it a more smooth look. I have been all over the forum and on the web looking for answers and have no clue on how to go about this....thanks ahead of time for the help...Kenny

Re: Rounding and Image

Posted: Wed Mar 13, 2013 12:42 am
by Simon
Hi Kenny,
I'm not sure what the iPhone image looks like, but if you just what rounded corners:
I think they call it a mask. It would be an image that is placed on top of your image, the middle would be transparent.
If you don't have photoshop or gimp or don't know how to make one, just give me the dimensions of you image (possibly background color) and I'll post something.

Simon

Re: Rounding and Image

Posted: Wed Mar 13, 2013 1:39 am
by sturgis
If you need your mask to be scalable you can most likely do it in parts.

1 part for each corner, 2 lines vertical, 2 lines horizontal then do proportional scaling based on the image size.

Re: Rounding and Image

Posted: Wed Mar 13, 2013 1:53 am
by bn
Hi Kenny,

if I understand you correctly you can get the effect in Livecode.

Make a graphic of type rounded rectangle. Make it opaque. Set the borderwidth to 2, set the radius to 20.
Set the bordercolor to gray.
Now set the backgroundPattern of the graphic to the short id of the image. Just the number, without "id"
You can either adjust the graphic to the dimensions of the image or scale the image to the dimensions of the graphic.

Here is a little stack that shows that.
graphic as mask.livecode.zip
(4.34 KiB) Downloaded 481 times
Kind regards
Bernd

Re: Rounding and Image

Posted: Wed Mar 13, 2013 2:12 am
by sturgis
Ok, thats just cool. I learn new things every day it seems!

Re: Rounding and Image

Posted: Wed Mar 13, 2013 8:43 pm
by KennyR
Thank you to everyone who helped me out! This problem has been bothering me for the past few days...I'm off to give this a shot...