Combining multiple pngs into a single png

Scott Rossi scott at tactilemedia.com
Wed Jan 19 16:30:43 EST 2011


The cool thing about the syntax below is you can grab a screenshot from any
object or group of objects regardless of whether they fit in the window or
on the card.  If you group the group of PNGs, you can limit the visible
display of PNGs to whatever you want, but you can still snapshot the entire
set of PNGs by virtue of them being in a group.

So if your PNG group -- say the group named "catalog"-- is 1200 pixels wide,
and you place the catalog group inside another group -- say this group is
called "container" -- you can set the width of the container group to 400
pixels with a scrollbar, so the contents (catalog group) can be viewed by
scrolling.  When it comes time to create a snapshot, the following will
capture the entire catalog group even while it is masked off by the
container group:

 import snapshot from rect (rect of grp catalog) of grp catalog

Regards,

Scott Rossi
Creative Director
Tactile Media, UX Design


Recently, Glen Bojsza wrote:

> Thanks Scott, I was doing only one rect (the rect of grp imgGroup).
> 
> Also, the size of grp imgGroup must be large enough to show all the images.
> This is where the grp imgGroup can extend past the window.
> 
> 
> On Wed, Jan 19, 2011 at 1:05 PM, Scott Rossi <scott at tactilemedia.com> wrote:
> 
>> Recently, Glen Bojsza wrote:
>> 
>>> Is this possible to choose a folder that contains multiple pngs and
>> create a
>>> single png where each png in the folder is place right after the previous
>>> one. The pngs would be centered to the first one and could either be
>>> touching along the top/bottom edges or have a small space between them.
>>> 
>>> I thought of placing them in a scrollable window or field but getting a
>>> single png with all of them showing has been the problem.
>>> 
>>> Has anybody tried something like this?
>> 
>> I use a scrolling group that contains images (one for each PMG).  Are you
>> talking about taking a screenshot of all the PNGs together in the group?
>> Something like:
>>  import snapshot from rect (rect of grp imgGroup) of grp imgGroup
>> 
>> Also, I just tried a quick test and importing a snapshot works fine when
>> capturing a region that extends beyond the stack window, so if all you PNGs
>> don't fit in the window comfortably, you should be able to capture them
>> regardless.
>> 
>> Regards,
>> 
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX Design
>> 
>> 
>> 
>> _______________________________________________
>> 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
>> 
> _______________________________________________
> 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