Maximum Card and/or Background Size

44 views
Skip to first unread message

cmclane

unread,
Jun 18, 2018, 12:19:13 PM6/18/18
to SuperCard Discussion
What is the maximum size allowed in Supercard for a card or background? What units are the dimensions specified in? (screen pixels?)
Message has been deleted

Charles McLane

unread,
Jun 18, 2018, 9:34:26 PM6/18/18
to superca...@googlegroups.com
Scott -- Thanks for the quick reply, but that can't be right.


On Mon, Jun 18, 2018 at 1:55 PM, Scott <scottin...@gmail.com> wrote:
One pixel by one pixel... although the enclosing window will always have a minimum height of the Title Bar.

--
You received this message because you are subscribed to a topic in the Google Groups "SuperCard Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/supercard-talk/OuMBYTP3WlI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supercard-talk+unsubscribe@googlegroups.com.
To post to this group, send email to supercard-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/880d0e2d-1d89-4922-8232-ddb4105092bf%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Charles F. McLane III, PhD
Principal

707 Alexander Road, Suite 206 - Princeton NJ 08540
Direct: 609-919-2701  Fax: 609-987-8488

codegreen

unread,
Jun 18, 2018, 10:21:09 PM6/18/18
to SuperCard Discussion
Although in theory they can go as high as 32767x32767, due to anomalies in various incarnations of OS X's emulation of QuickDraw I find about 32000x32000 to be a practical upper limit.

Why do you ask?

-Mark

Scott

unread,
Jun 19, 2018, 9:36:23 AM6/19/18
to SuperCard Discussion
For some reason I read "maximum" as "minimum". (c;

Was pretty sure the max was 32000 by 32000, but thought I'd let Mark corroborate it.

cmclane

unread,
Jun 19, 2018, 10:48:46 AM6/19/18
to SuperCard Discussion
I would like to import a graphic representing a map. The maps we work with are typically in state plane coordinates in feet or meters. In feet a map area that is 20 miles by 20 miles (just as an example) would be roughly 100,000 by 100,000 feet. If the max background size is 32,000 by 32,000 then I won't be able to have one square pixel represent one square foot. I'm not sure I need that resolution (I'm just thinking through the possible project at this point) but I wanted to know what the card size limit was. Thanks for your helpful answer.

codegreen

unread,
Jun 19, 2018, 11:49:07 AM6/19/18
to SuperCard Discussion
In that case there's another gotcha you'll probably encounter long before you get to worry about card size...

Like most Carbon apps SC uses pixmaps to render images. These are subject to a 14-bit width limit (their rowBytes is stored in a short, but for historical reasons its top two bits are reserved by QuickDraw as flags) and depending on their bit depth may use that up at a multiple of their pixel width.

Thus for a 24-bit image you end up with a maximum width of around 0x2FFF (or a bit over twelve thousand) pixels. If there'a an alpha channel, that drops to about 8000 pixels. So if your maps are intrinsically only 8-bit, make sure they don't somehow get converted to something deeper prior to import (to minimize your burn rate...)

FWIW you can entirely sidestep these limitations by tiling larger images into a grid of graphics (at least) one row and column bigger than your window (as the original Mac port of Topo did) so you can use a combination of scrolling the window and swapping the pictureData among your tiles to 'scroll' around through arbitrarily large maps, but it takes a bit of fancy scripting.

If you want to try this, you should also be aware of the (somehow apparently still undocumented) set the pictureData of grc x to the pictureData from grc y syntax, which for efficiency lets you steal the pictureData image (and more importantly any existing backing buffer) from one graphic and assign it directly to another. This way you never need to load more than one row and column (and usually just one or the other) of images into your grid at once from disk when scrolling.

HTH,
-Mark

codegreen

unread,
Jun 19, 2018, 12:04:09 PM6/19/18
to SuperCard Discussion
BTW the 'tiling the image’ part of that probably sounds laborious and complicated, but it’s actually just a one-liner using the freeware imagemagick command-line tool.

-Mark

David Coggeshall

unread,
Jun 19, 2018, 12:59:49 PM6/19/18
to superca...@googlegroups.com, cmc...@mclaneenv.com, ibc...@aol.com
Hello SuperCard list and C Mclane,

I have used SuperCard over the years for many graphic applications including maps and floor plans, which I now convert to Google Maps Ground Overlays. Here are a few tips from my experience:

1)  The card size can be as large as 32K on a side, but a single graphic of that size will require too much memory to open.

2)  I often tile 4 or 9 or more graphics (raster picturedata, not vectors) on a single card then and load them separately.

3)  The maximum size loadable into a single rectangle is, I think, a matter of the bit depth. This also is reflected in the size of the file being loaded.

4)  A clean cartographic map, that does not use a lot of different colors, compresses well into a PNG file.

5)  PNG files can also have an alpha channel which is great for getting rid of a white background to make a semi-transparent overlay.

6)  I use an old version of Photoshop to convert 24 bit PNGs to 8 bit PNGs, which drops the size by 66%.

7)  JPGs work great for aerial photo maps.

8)  Also, it is better to use "ref picturedata" so that the large graphics can reside outside of the project structure (in the same folder).

9)  I also import vector objects such as building footprints that can be named and then used for programmatic navigation.

10) Detailed interactive floor plans are also a big development activity for me.

I would be happy to have a off-list discussion of SuperCard Mapping Applications.

Best regards,

David Coggeshall
San Francisco Communications
Golden Gate Safety Network
79 Rossi Avenue, SF CA 94118


--
You received this message because you are subscribed to the Google Groups "SuperCard Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supercard-tal...@googlegroups.com.
To post to this group, send email to superca...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/supercard-talk/1eb3e4ef-3f33-48c5-8867-fe340a792379%40googlegroups.com.

Charles McLane

unread,
Jun 19, 2018, 1:01:02 PM6/19/18
to superca...@googlegroups.com
​Wow . . . ask and you shall receive! That is great information​. I loved using Supercard many years ago but let it lapse, and I have been thinking about this project for awhile now. I'm going to purchase a new license for 4.8 and start playing around. Thank you Mark and Scott for your answers and helpful information.

 - Charlie


On Tue, Jun 19, 2018 at 12:04 PM, 'codegreen' via SuperCard Discussion <superca...@googlegroups.com> wrote:
BTW the 'tiling the image’ part of that probably sounds laborious and complicated, but it’s actually just a one-liner using the freeware imagemagick command-line tool.

-Mark

--
You received this message because you are subscribed to a topic in the Google Groups "SuperCard Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/supercard-talk/OuMBYTP3WlI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supercard-talk+unsubscribe@googlegroups.com.
To post to this group, send email to supercard-talk@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

codegreen

unread,
Jun 19, 2018, 1:14:51 PM6/19/18
to SuperCard Discussion
It's probably also worth mentioning that (as David notes) this works MUCH better with pictureData set by reference (which nowadays supports any importable image format) and better still when the project's cantModify is true (either set via script, or because the host project is actually locked).

This all but eliminates the expensive data shuffling within your project that would normally happen when you scrolled past an edge of the grid and had to juggle images among existing tiles (which this way requires only passing around file paths and buffer addresses in memory instead of reading and possibly converting image files for each of those tiles from disk) and then load new image data into the 'exposed' row/column (since that data never becomes part of the viewer project either). 

And as a bonus there's zero cleanup cost, since the viewer project automatically reverts to its default state when closed.

HTH,
-Mark

Charles McLane

unread,
Jun 19, 2018, 1:32:47 PM6/19/18
to superca...@googlegroups.com
That makes sense. I'm assuming the image tiles can either be in the project folder or in another folder as long as I specify the path. I'll test this out.

--
You received this message because you are subscribed to a topic in the Google Groups "SuperCard Discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/supercard-talk/OuMBYTP3WlI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supercard-talk+unsubscribe@googlegroups.com.
To post to this group, send email to supercard-talk@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

cmclane

unread,
Jun 19, 2018, 2:28:23 PM6/19/18
to SuperCard Discussion
David - - Thank you for sharing this; I genuinely appreciate it. Your workflow outline will probably save me weeks of trial and error. I don't currently have Photoshop, but I'm thinking I could use Irfanview for your steps 5 and 6. Let me get into this a bit and I may definitely take you up on your offer for an offline discussion. There are several other items I have in mind (beyond just getting the map tiled and on the card) for drawing features as an overlay and it sounds like you may already have been through a good bit of this.

Best,

Charlie McLane

McLane Environmental
707 Alexander Road, Suite 206

codegreen

unread,
Jun 19, 2018, 3:24:17 PM6/19/18
to SuperCard Discussion
For step #6 there's an excellent freeware command-line PNG 24 to 8 bit compressor called pngquant.

-Mark

cmclane

unread,
Jun 19, 2018, 4:15:59 PM6/19/18
to SuperCard Discussion
70% file size reduction and retains full alpha transparency.  It sounds like a great tool. Thanks Mark.
Reply all
Reply to author
Forward
0 new messages