Hi All,
I am about to start working on some code to create image banners (i.e., rectangle image bars) from selected images. If anyone has done this before and perhaps has some sample code they would be willing to share, then that would be awesome. (Before rolling my own, I figured it might be a good thing to check.) Thanks; I really appreciate it.
Sincerely,
Keith "Boo" Long
Gulf Breeze, Florida
Anyone have example code for creating banners from an image?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 348
- Joined: Sun Jul 03, 2011 2:04 am
- Location: Gulf Breeze, Florida
-
- VIP Livecode Opensource Backer
- Posts: 4000
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Anyone have example code for creating banners from an im
Hi Keith,
good to see you.
What do you mean by banner. Do you mean a cropped image to the dimensions of the banner or what?
Kind regards
Bernd
good to see you.
What do you mean by banner. Do you mean a cropped image to the dimensions of the banner or what?
Kind regards
Bernd
-
- VIP Livecode Opensource Backer
- Posts: 348
- Joined: Sun Jul 03, 2011 2:04 am
- Location: Gulf Breeze, Florida
Re: Anyone have example code for creating banners from an im
Hi Bernd,
Good to see you! Yeppers; I am referring to a banner image cropped from a standard photo. (I wrote my previous post kind of quickly and should have clarified it better.)
In particular, I hope to generate banner images that can be used on responsive Web pages, something like the following:
https://www.electrictoolbox.com/example ... anner.html
You are the guru, so I welcome your feedback. And as always, thank you.
Sincerely,
Keith "Boo" Long
Gulf Breeze, Florida
P.S. Kelly and I enjoyed meeting you at the Conference in Edinburgh last summer.
Good to see you! Yeppers; I am referring to a banner image cropped from a standard photo. (I wrote my previous post kind of quickly and should have clarified it better.)
In particular, I hope to generate banner images that can be used on responsive Web pages, something like the following:
https://www.electrictoolbox.com/example ... anner.html
You are the guru, so I welcome your feedback. And as always, thank you.
Sincerely,
Keith "Boo" Long
Gulf Breeze, Florida
P.S. Kelly and I enjoyed meeting you at the Conference in Edinburgh last summer.
-
- VIP Livecode Opensource Backer
- Posts: 4000
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Re: Anyone have example code for creating banners from an im
Hi Keith,
here is a little stack that shows how to use the crop command.
There is a transparent graphic that you drag over the top image and then click on button "cropImage" to crop the image, put it into the bottom image and restore the top image from a custom property of the card that contains the image. Change the graphic's size/proportions to what you want by resizing the graphic.
from the dictionary
this turns the referenced image into a local image that you can crop.
The stack is just bare bones but should get you started.
Kind regards
Bernd
here is a little stack that shows how to use the crop command.
There is a transparent graphic that you drag over the top image and then click on button "cropImage" to crop the image, put it into the bottom image and restore the top image from a custom property of the card that contains the image. Change the graphic's size/proportions to what you want by resizing the graphic.
from the dictionary
If you have a referenced image you would have to useImportant: The crop command cannot be used on a referenced control|referenced image>. Doing so will cause an execution error.
Code: Select all
set the imageData of image "myImage" to the imageData of image "myImage"
The stack is just bare bones but should get you started.
Kind regards
Bernd
- Attachments
-
- imageCropping.livecode.zip
- (83.05 KiB) Downloaded 221 times
-
- VIP Livecode Opensource Backer
- Posts: 348
- Joined: Sun Jul 03, 2011 2:04 am
- Location: Gulf Breeze, Florida