Importing an image

Pete Haworth lists.pete at haworths.org
Tue Jul 26 12:41:38 EDT 2011


Thanks everyone - so many properties, so little time.....

Pete



On Tue, Jul 26, 2011 at 8:18 AM, Mark Wieder <mwieder at ahsoftware.net> wrote:

> Pete-
>
> Monday, July 25, 2011, 10:32:09 PM, you wrote:
>
> > I totally missed the "paint" keyword in the dictionary but all is well
> now.
>
> > The reason I was doing this is because took a PNG snapshot of a group
> > control into an image control, then tried to resize the image control,
> but I
> > found that the image lost definition very quickly.  My solution was to
> > export to a file, resize it in Photoshop, then import it.  Maybe there's
> a
> > way to do the resizing in LC without losing definition?
>
> Here's how I do group control snapshots in PowerTools. Obviously this
> could be simplified a lot if you're working in the same stack and with
> a fixed height and width:
>
> private function CreateThumbnail pWidgetGroup, pStack, pThumbRect
>    import snapshot from control id pWidgetGroup of stack pStack
>    set the resizequality of the last image to "best"
>    set the width of the last image to item 1 of pThumbRect
>    set the height of the last image to item 2 of pThumbRect
>    return the id of the last image
> end CreateThumbnail
>
> --
> -Mark Wieder
>  mwieder at ahsoftware.net
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list