[comp.sys.mac.programmer] Application to generate Color PICT's

time@ice.com (03/01/91)

I would really like to place color PICT resources into my programs
and draw them. Until now, I simply created stuff in SuperPaint, then
copied and pasted into PICT resources in ResEdit, then drew the PICT's
with DrawPicture().

I presume DrawPicture() will continue to function properly with the
newer color PICT's, but I do not know what application I can use to
generate color PICTs.

Anyone have a favorite method?

tim.

-------------------------------------------------------------
Tim Endres                |  time@ice.com
ICE Engineering           |  uupsi!ice.com!time
8840 Main Street          |  Voice            FAX
Whitmore Lake MI. 48189   |  (313) 449 8288   (313) 449 9208

mxmora@unix.SRI.COM (Matt Mora) (03/02/91)

In article <1CE00001.kq7jhj@tbomb.ice.com> time@ice.com writes:
>I presume DrawPicture() will continue to function properly with the
>newer color PICT's, but I do not know what application I can use to
>generate color PICTs.
>
>Anyone have a favorite method?

Yes drawpicture will work with color picts. 

I use either Pixel Paint Professional or Studio 8.

They also work great for making color icons. 

Your mileage may very :-)





-- 
___________________________________________________________
Matthew Mora                |   my Mac  Matt_Mora@sri.com
SRI International           |  my unix  mxmora@unix.sri.com
___________________________________________________________

peirce@outpost.UUCP (Michael Peirce) (03/02/91)

In article <1CE00001.kq7jhj@tbomb.ice.com>, rnews@outpost.UUCP Fri Mar  1 15:01:28 1991 writes:
> 
> 
> I would really like to place color PICT resources into my programs
> and draw them. Until now, I simply created stuff in SuperPaint, then
> copied and pasted into PICT resources in ResEdit, then drew the PICT's
> with DrawPicture().
> 
> I presume DrawPicture() will continue to function properly with the
> newer color PICT's, but I do not know what application I can use to
> generate color PICTs.
> 
> Anyone have a favorite method?

I use a couple of techniques.

MacDraw II 1.1 allows you to generate color PICTs using the old style 
8 colors.  You can get more colors by using it's dithered patterns.  
This method has one big benefit - it's completely compatable with older 
b&w systems.  For example, I want a blue colored circle.  I produced 
in MacDraw II 1.1 and cut/paste into my program using ResEdit.  It 
gets drawn in blue on color systems and black on b&w systems. 

If you want to get more tricky you can go with real 8/24 bit color.
Use Canvas or Michael's Draw or any other color program to produce
your color pict.  Then draw it using DrawPicture.

There's one problem with doing this though, 8-bit color picture often
look horrible wen drawn on b&w systems (often all black).  To get
around this you need to check the depth of the device your drawing
on and draw a 1-bit picture OR an 8-bit picture depending.

There still a problem with this technique.  Unless you are sure your
PICT bounds are restricted to one screen (like a modal dialog) you
need to check for the case where your PICT spans monitors set to different
bit depths.  You then need to check each part and draw it at the proper
bit depth.  I understand System 7 adds some support for accomplishing
this, though it's not all that hard to do now.

Fun eh?  I try to stick with the first technique for gratuitous color
and only go through the work of technique two when it's really required.
You'd be surprised how well technique one can work with a little fooling
around.

-- michael

P.S.  Michael's Draw (from Michael Everest at Event One (408) 734-4358)
has two features that come in really handy for generating color pictures
for program use: (1) it will produce anti-aliased pictures from Draw
oriented data.  This can lead to VERY good looking PICTs.  Text is
awesome (esp. when bound to a curve) and curves look terrific too.
(2) It can produce 24-bit color PICTs that are automatically dithered
to 8-bit when draw on an 8-bot device.  Very easy to use if you can
afford the memory for 24-bit PICTs.  Worth checking out...


--  Michael Peirce         --   outpost!peirce@claris.com
--  Peirce Software        --   Suite 301, 719 Hibiscus Place
--  Macintosh Programming  --   San Jose, California 95117
--           & Consulting  --   (408) 244-6554, AppleLink: PEIRCE

JKT100@psuvm.psu.edu (JKT) (03/08/91)

In article <0B010004.qecx4h@outpost.UUCP>, peirce@outpost.UUCP (Michael Peirce)
says:
>
>In article <1CE00001.kq7jhj@tbomb.ice.com>, rnews@outpost.UUCP Fri Mar  1
>15:01:28 1991 writes:
>>
>> I would really like to place color PICT resources into my programs
>> and draw them. Until now, I simply created stuff in SuperPaint, then
>> copied and pasted into PICT resources in ResEdit, then drew the PICT's
>> with DrawPicture().
>
>MacDraw II 1.1 allows you to generate color PICTs using the old style
>8 colors.  You can get more colors by using it's dithered patterns.
>This method has one big benefit - it's completely compatable with older
>b&w systems.  For example, I want a blue colored circle.  I produced
>in MacDraw II 1.1 and cut/paste into my program using ResEdit.  It
>gets drawn in blue on color systems and black on b&w systems.

That method has one OTHER big benefit - file size.  24 bit PICTs
can get HUGE... complex ones can be megabytes in size.  You can get
very colorful with 8-bits, especially using dithering, and you keep
most files under 50K.  Quite a benefit for those users who still do
not have hard drives.  :-)

                                                            Kurt
--
 -----------------------------------------------------------------------
|| Kurt Tappe   (215) 363-9485  || With.   Without.   And who'll       ||
|| 184 W. Valley Hill Rd.       || deny it's what the fighting's       ||
|| Malvern, PA 19355-2214       || all about?    -  Pink Floyd         ||
||  jkt100@psuvm.psu.edu         --------------------------------------||
||  jkt100@psuvm.bitnet  jkt100%psuvm.bitnet@psuvax1  QLink: KurtTappe ||
 -----------------------------------------------------------------------

knoll@well.sf.ca.us (John Knoll) (03/10/91)

Adobe Photoshop can be used to create PICT resources of any depth or size.
Just use the "Save As" feature and pick PICT resource as the format.