Solved

Problems using RGBImageFilter

Posted on 1997-08-18
2
326 Views
Last Modified: 2012-05-04
Has anyone used RGBImageFilter?  I subclassed it and mapped colors from one image to another.  The resulting image looks OK within browsers on an NT machine, but the image is "blank" (no image at all and no error messages) on a Mac.  I've tried setting the alpha channel by hand and using colors from Netscapes colormap - to no avail.  I also tried to run the applet from AppletViewer (JDK 1.0.2) with same result.  It seems specific to the Mac.  The filter also works fine on an SGI (NS 4.0.2).
Has anyone else run across this?  Could it be a problem with a different color model used on the Mac?  Does anyone know of an applet that uses the RGBImageFilter?
0
Comment
Question by:gnawed
2 Comments
 
LVL 10

Accepted Solution

by:
kollegov earned 100 total points
ID: 1225372
It's specific MAC's problem!
Something wrong with MAC's Netscape classes packages.

I know it for sure. I have a lot of applets at my
pages which use RGBImage filter
And with my good friend who uses Mac we found this problem.

He also had this problem with applets
supplyed by "Demicron" (www.demicron.com)

He checked this applets with TWO different models
of MAC. All the same...

You can try my "luminous" applet
from my page:
http://www.geocities.com/siliconvalley/lakes/8620
This one do not use RGBImage filter, it work with pixels
in RGBColorModel and it also has problems at MAC.

There are some other my classes "imagewave" and "lines" uses
RGBImageFilter wich can filter indexed color model.
If you want to check more applets :)

Virtual_Max
http://www.geocities.com/siliconvalley/lakes/8620

0
 
LVL 1

Author Comment

by:gnawed
ID: 1225373
Thanks for the answer kollegov.  It's good to know that I'm not going crazy.
After more work, I discovered some strange results.  If I do a fillRect() to an off-screen image and then try to RGBImageFilter the off-screen image, then NS3 or 4 on the MAC NEVER calls the filterRGB() method of RGBImageFilter!!!  In SUN's appletviewer on the MAC, the filterRGB() method gets called, but claims that all the pixels = 0 (black, with full transparency)!!!  However, if I read in an image from a URL (disk, website, etc), then it the RGBImageFilter works fine!!
I also tried to use PixelGrabber to convert the off-screen image into an integer array, then change the pixel values, and use MemoryImageSource to paste it back into another image - again, didn't work in either NS3/4 or appletviwer on the MAC.  It's possible that the RGBImageFilter uses PixelGrabber (which returned zeros again), so this may be the same problem manifested differently.  Also, if I loaded an image from a URL everything worked fine again.
Here's to platform independence!!!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
difference of if loops 23 60
java jdbc batch example 8 40
servlet example issue 6 46
Can anyone please tell me why i can not find ID  investorCoolGrid inside the jsp page? 1 22
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question