Solved

Problems using RGBImageFilter

Posted on 1997-08-18
2
304 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now