Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colour me grey




On 30 Aug 2006, at 21:11, David Leader wrote:

Because of a love of the classic Mac operating system, and a need to support OS9, I have been working for a long time (albeit in an intermittent and amateur manner) with the AWT and java 1.1. My apps (generally canvases on which scientific information was visualized) printed ok (I thought - always used a B&W laser printer) and I could generate gif and ps graphics using 1.1 packages from sources like Acme and the Sandia guy.

But this summer I decided to move up to Java Swing etc and developed a new little scientific app in 1.2 on my new PB (and am ready to go up to 1.5 if needed). However:
1. The acme print gif doesn't work - reckons my improved graphics have too many colours (Photoshop only makes it about 200, but I'm willing to give it the benefit of the doubt.)

This is probably due to antialiasing of the graphics which introduces all sorts of extra colours at the edges. I have a colour-quantizing filter you can use to reduce the number of colours: http:// www.jhlabs.com/ip/filters/


2. The create ps method doesn't seem to give me anything but portrait but I need to save the images I am creating are in landscape.
and

Can't you just call Graphics.rotate() to rotate before you start drawing?


3. Horror of horrors, when a colleague printed from my latest toy to a colour printer I discovered that my print methods for 1.2 (and 1.0), based on Flanigan's examples, only printed in grayscale.

Now the grey may match my hair colour, but I'd appreciate it greatly if someone could point me, in order of importance:

1. ...to the simplest method of using a colour printer to, well, print java in colour - do I really have to use 1.5 and enum things I know nothing about?

I've got no help here but to say that it's always worked for me in colour. Perhaps it's something to do with your default printer settings. Does printing to PDF work in colour?


2. ...to the simplest method of generating pngs (or do I have to go to tiffs?). My O'Reilly Java 2D book tells me all about reading pngs, but nothing about creating them. Do I really have to go into advanced imaging? Are pngs so advanced?

That's easy:

javax.ImageIO.write( image, "png", file );

3 ... the best route from Java drawThing() to vector graphics - cross platform please.

While this isn't cross-platform: Remember that when you print on OS X, you get the option of generating PostScript/PDF.


Jerry

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Colour me grey (From: David Leader <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.