Solved

Problems using RGBImageFilter

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet example issue 6 38
How to execute a Python program and gather return output in Java 2 26
jsp login check 12 29
What's wrong with this code? 4 22
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
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 …

785 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