Solved

Problems using RGBImageFilter

Posted on 1997-08-18
2
333 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
couple of eclipse 5 52
jboss wildfly 10.1 10 417
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO) 1 58
Eclipse for Java EE development 2 43
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 …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

756 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