Canvas Size

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
interactbooks
Posts: 65
Joined: Thu Oct 07, 2010 4:47 pm

Canvas Size

Post by interactbooks » Sat Jan 21, 2012 8:10 pm

Hopefully this is a relatively easy request. I am trying to write code that would open a PNG file, resize the canvas of the file and then save the file with the new canvas size. I do not want to scale the image I just want to increase the canvas size. Thanks in advance!

interactbooks
Posts: 65
Joined: Thu Oct 07, 2010 4:47 pm

Re: Canvas Size

Post by interactbooks » Sun Jan 22, 2012 8:05 am

Answered my own question was pretty simple, just use the CROP command:

Code: Select all

 
crop image "image" to the rect of this card
export image "image" to file "/testimage.png" as png

raulvelazquez
Posts: 54
Joined: Fri Jan 20, 2012 6:08 pm

Re: Canvas Size

Post by raulvelazquez » Mon Jan 23, 2012 12:57 am

This will help me.
Thanks!

Post Reply