[JAI] Palette problem

Hello,
I want to have a image with a palette looking like :
0->255 Red
256->512 Green
512->768 Blue
How can I do that with JAI ?

the problem is how you want to treat to border of your image. The blur works by calculating the average value of the neighbouring pixels for a given center pixel. So you have to tell your algorithm what to do if your "center" pixel sits on the outside border and lacks its neighbours...
take a look at the docu on java.awt.image.ConvolveOp which specifies two types of "edge_conditions", i.e. solutions to the problem: EDGE_NO_OP, EDGE_ZERO_FILL

Similar Messages

  • 8800GT palette problems?

    I just received my 8800GT upgrade for my "original" Mac Pro. I had seen a couple of instances of the palette getting "screwed up" after a long period of time, which I thought might be a problem with heating (my 1900XT had all sorts of problems). Looking over the posts here, I saw a number of people with the exact same problem, a green-cyan color showing up in lines around the screen.
    However, the problem seemed to go away and I hadn't seen it again. Until just now. My screen saver kicked in and when I shook the mouse to wake it up again, the palette problem was back.
    Can anyone else with an 8800 confirm or deny this problem? I'm on a 1 GB dual 266 Mac Pro.

    Icon page view:
    Not that I want the image of the icon to actually change/scale in size....I visually see no page icons in my palette. The only way I can see the page icon is if I drag the bottom right corner all the way across my screen. Then they appear on the right hand side of the palette. If I only have the palette open half an inch or so it looks like I have no pages in my document.
    Snapping closed:
    This only seems to happen to my top dock. My other palettes in lower docks (stokes, color, swatches, etc...) do not snap closed.
    I'll try to discribe the best I can since I don't know what is going on with my image. I have my palettes icon view only in 1 long skinny palette menu bar. Inside the long palette it is divided up. The top section is pages, links, layers. The next section is stoke, color, swatches, gradient. The next section is text, paragraph, chara styles, text wrap, glyphs.
    I'm working in the icon only view of my palettes, but I've also tried icon and text view of the palettes. When I work with all palettes expanded they do not snap closed
    Preferences:
    Tried deleteing preferences to fix problems with no aveil. Just have to wait for an update I guess. Just weird because I work with 4 other designers who have not have as much problems as mine recently. Should I consider reintalling?

  • The same old Character Palette problem

    Yep. I've got the same old Character Palette problem. Running Mac OS X 10.4.10, all the latest updates, checked the forums for all the help I could find, and tried everything, and still every **** time I sign in or come back from sleep, the character palette shows up!

    hey, husayndas
    i'm currently having this exact same thing happen!!
    could you outline exactly how you managed to turn the palette off?
    much appreciated!

  • JAI: GaussianBlur problem

    I have made a GaussianBlur class to control image Gauss blur .
    but the larger radius I give the kernel, the thicker edge the image gets.
    what's the problem?
    // to generate gauss kernel
    private static float[] makeKernel(double radius) {
    radius += 1;
    int s = (int)radius;
    int size = s*s;
    float[] kernel = new float[size];
    double v;
    for (int i=0; i<s; i++) {
         for ( int j= 0; j < s; j++) {
         kernel[i*s + j] = (float)(Math.exp(-0.5*(sqr(i)+sqr(j))/sqr(radius))/(2*Math.PI*sqr(radius)));
         return kernel;
    public void applyFilter(float radius) {
         float[] elements = makeKernel(radius);
         normalize(elements);
         KernelJAI kernel = new KernelJAI((int)radius+1, (int)radius+1, elements);
         // start convolve image on the kernel
         ParameterBlock pb = new ParameterBlock();
    pb.addSource(source);
    pb.add(kernel);
    RenderedImage target = JAI.create("convolve", pb, null);

    the problem is how you want to treat to border of your image. The blur works by calculating the average value of the neighbouring pixels for a given center pixel. So you have to tell your algorithm what to do if your "center" pixel sits on the outside border and lacks its neighbours...
    take a look at the docu on java.awt.image.ConvolveOp which specifies two types of "edge_conditions", i.e. solutions to the problem: EDGE_NO_OP, EDGE_ZERO_FILL

  • JAI speed problem

    Hi everybody,
    I met a very tricky problem in using JAI to process tiff files. When I use JAI to process a small tiff stream of about 30k, it takes a hour and show the image successfully. The code I was using is as follows:
    SeekableStream s=new MemoryCacheSeekableStream(new FileInputStream("c:/example.tif"));
    ParameterBlock pb = new ParameterBlock();
    pb.add(s);
    TIFFDecodeParam param = new TIFFDecodeParam();
    pb.add(param);
    long nextOffset = 0;
    do {
    RenderedOp op = JAI.create("tiff", pb); // It takes a hour for JAI to execute this statement
    //...some code to show the image of "op"
    nextOffset = dir.getNextIFDOffset();
    if (nextOffset != 0) {
    param.setIFDOffset(nextOffset);
    } while (nextOffset != 0);
    Anybody has any idea or similar experiences? Thanks a lot.

    the problem is how you want to treat to border of your image. The blur works by calculating the average value of the neighbouring pixels for a given center pixel. So you have to tell your algorithm what to do if your "center" pixel sits on the outside border and lacks its neighbours...
    take a look at the docu on java.awt.image.ConvolveOp which specifies two types of "edge_conditions", i.e. solutions to the problem: EDGE_NO_OP, EDGE_ZERO_FILL

  • JAI installation problem, javax/media/jai/util/ not found?

    Hi,
    I am trying to use the JAI instllation in executing a class. However, I keep getting the following message.
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/media/jai/util/
    I have added some jars from the JAI instllation to my classpath. However, I still get this message.
    What jar file do I have to reference so I do not get this message?

    Even more strange, I deploy it under Unix, there is no problem. The previous one is deployed
    under Windowns XP. Anyone has same experience?

  • Pages palette problems cs4

    The pages palette behaves silly.
    On the right, some page icons are not showing up.
    E.g. the palette shows pages 1 to 13 but not 14 to 17.
    On the left of the palette I can see again pages 18-19, 20-21 etc. (2th row)
    Also the icons in the corner right down are gone (to create, delete a page, etc.)
    Resizing does not fix this.
    When upgrading to 6.0.1, it was fixed for a while, but now the problem is there again.
    What can be wrong?
    (CS4 - Windows XP SP3 - Dell dimension 9200 - NVidia GeForce 7900 GS 256 MB - dual screen flat panels 24 inch & 19 inch)
    Luc Van de Cruys

    Think I found a solution - or better: a workaround for it.
    When I delete the Indesign defaults, the problem stays.
    But when I delete the InDesign SavedData file
    (it is in C:\Documents and Settings\<user name>\Local Settings\Application Data\Adobe\InDesign\Version 6.0\en_GB\Caches)
    the problem is gone.
    Maybe this can help to find out what really causes this problem - and find a better solution to avoid it?
    Thank you all!
    L.L.

  • Pages Palette Problem

    Hi all.
    I opened InDesign CS2 the other day and encountered this strange look to the pages palette. THough I've reset the workspace to default, changed my screen resolution, played with the Palette options, I can't get the palette to resize so I can see all the pages in the document. I usually have it set vertical. The pages icons are way off to the right at the edge of the box. I usually can't see the 2nd page in the spread.
    Anyone have an idea what this is doing and how to fix it?
    thanks
    ∞Jeremy

    Try resetting your preferences. Here is a guide on how to reset (trash) your InDesign preferences:
    A PDF tour of all presets in InDesign CS4 and CS3 with Mac screenshots
    http://jetsetcom.net/index.php?option=com_content&task=view&id=24&Itemid=30
    Also, I see this problem occur when I put the pages panel (no longer called palette since CS3 on) on a second monitor. Is that the situation with you?
    Mike Witherell in Maryland

  • Keynote 6.5 color palette problem

    How do I get this "background pic" removed? I don't even know how it got there!
    Quitting the app or computer doesn't work.
    The pic itself is from a previous project.

    You didn't understand my question!
    This is the problem - the picture inside color palette.:
    I can't get rid of it!!!

  • Color Palette Problem

    I'm somewhat new to Fireworks... I've been using it now for a
    few months, but here recently I've run into something I just can't
    figure out. It seems as though when I'm working with colors, I'm
    working with a smaller color palette than what I worked with after
    I first installed Fireworks.
    If I pick a hexadecimal color value and try to use it in
    Fireworks, it winds up picking the closest match to that color. For
    instance, if I choose #FFFFE6 (very light yellow) as the starting
    color for a gradient and choose #FFFFCC for the ending color,
    #FFFFE6 will show up as #FFFFFF... almost white. This same problem
    occurs using fills as well. I've also noticed that when using the
    color picker, dragging it across a gradient may only show 3 or 4
    colors, although I can visually see the differences in colors per
    pixel at an enlarged resolution. Before a few weeks ago it would
    show seemingly infinite numbers of hex values when doing the same
    thing.
    This problem didn't start until a few weeks ago... and I'm
    pulling my hair out trying to figure out how to fix it. Any help
    will be greatly appreciated.
    Thanks!

    Make sure you don't have 'Snap to WebSafe' enabled in the
    flyout of the
    color picker (upper right arrow)
    alex
    fannyarbucklewith135 wrote:
    > I'm somewhat new to Fireworks... I've been using it now
    for a few months, but
    > here recently I've run into something I just can't
    figure out. It seems as
    > though when I'm working with colors, I'm working with a
    smaller color palette
    > than what I worked with after I first installed
    Fireworks.
    >
    > If I pick a hexadecimal color value and try to use it in
    Fireworks, it winds
    > up picking the closest match to that color. For
    instance, if I choose #FFFFE6
    > (very light yellow) as the starting color for a gradient
    and choose #FFFFCC for
    > the ending color, #FFFFE6 will show up as #FFFFFF...
    almost white. This same
    > problem occurs using fills as well. I've also noticed
    that when using the
    > color picker, dragging it across a gradient may only
    show 3 or 4 colors,
    > although I can visually see the differences in colors
    per pixel at an enlarged
    > resolution. Before a few weeks ago it would show
    seemingly infinite numbers of
    > hex values when doing the same thing.
    >
    > This problem didn't start until a few weeks ago... and
    I'm pulling my hair out
    > trying to figure out how to fix it. Any help will be
    greatly appreciated.
    >
    > Thanks!
    >

  • Tool Palette Problem

    When I click on tools in my tools palette the other tools (hidden under it) do not flyout so I can select them. Very strange. Any help would be appreciated.
    Paul W.

    Do you mean click-and-hold or just click?
    Anyway you might just use the single-key Shortcuts to select secondary Tools (either hit the letter repeatedly or shift-letter, if Preferences – General – Use Shift Key for Tool Switch is checked).
    Boilerplate-text:
    As with all unexplainable Photoshop-problems You might try trashing the prefs (after making sure all customized presets like Actions, Patterns, Brushes etc. have been saved and making a note of the Preferences You’ve changed) by pressing command-alt-shift on starting the program or starting from a new user-account.
    System Maintenance (repairing permissions, purging PRAM, running cron-scripts, cleaning caches, etc.) might also be beneficial, Onyx has been recommended for such tasks.
    http://www.apple.com/downloads/macosx/system_disk_utilities/onyx.html
    Weeding out bad fonts never seems to be a bad idea, either. (Validate your fonts in Font Book and remove the bad ones.)

  • Layers Palette problem

    I'm new to Photoshop and I'm having trouble with layers. When I create a document I see it show up in the Layers Palette. No problem. However when I crear a second document to be added to the first layer, it shows up in a new Palette and I loose the first Palette. I must be missing a setting somewhere. Help!... I'm snowed.

    I think you misunderstand how this works. Documents are documents and layers are layers. Creating a new document does not create a new layer in another document. That would only be the case if you created a smart object using Layer --> New --> Smart Object from File or similar commands. In that case the smart object would be a nested/ linked document that is used as a layer in the parent document. If you want to create new layers, use the respective functions within the document itself.
    Mylenium

  • Color Palette Problems on Kuler

    So for some reason the color palettes won't download on kuler for me, every time i try and get a color scheme a shockwave flash somehow crashed. How do i fix this problem?

    Hi perki13km,
    Sorry to hear about your difficulties. What version of Kuler are you using? (there are a couple different ones, for example, the webpage, the Android app, or the panel in a suite product). Based on your reference to shockwave flash, if its the webpage version, I would try either updating or testing in an alternate browser. I know some older versions of Firefox for example don't work well with the webpage version.
    Hope that helps
    -Dave

  • Palette Problems CS4 InDesign

    I have previously written about this problem a year ago but have lived with it. We just rebuilt my computer and were put on to windows 7 64bit to try to help with our Adobe CS4 Suite gliches and random other issues.
    It was completed on Dec. 6th and now Dec 14th it has returned
    Hopefully getting off the PC platform and upgrading to CS5 but not for another year.
    I can delete my program preferences and cache but it is really annoying to have to reset everytime. Besides the problem seems to rear its ugly head again within a few days.
    Is there a techinical explanation on what is going on or another way to fix?
    Thank you!

    yes still have 2 monitors running. usually float my palettes to the right one and have the program window open on my left. When I move my palettes to the left monitor it stops that crazy snapping closed thing. I wish I could video it because it is so fast and odd, not just the normal snapping to close up the palette. But my icons always remain missing.
    the monitors say they are on their reccommended size: 1280x1024
    Not to add in more variables
    Again my issue was before all of this...
    I work with 2 other designers (so 3 total in our room) It seems once this starts on my computer then since we work on a server the files than corrupt the other designers palettes.
    We are an international company and have files coming from and sending to other countries and designers...could something be happening there??

  • Color palette problems using Toolbar and ImageList ActiveX Controls

    I'm using Toolbar and ImageList ActiveX controls to implement toolbar functionality in a top-level VI.
    I designed the icons used in the toolbar with a 256 color palette. When I initially added the icon images to the ImageList control and ran the VI, the icons were properly displayed in the toolbar, as expected. After saving VI, exiting LabVIEW, and reloading, it appears that a different palette has been applied to the images in the ImageList control. I'm attaching a screenshot of the problem as well.
    Has anyone encountered this type of problem before? Any suggestions you provide will be greatly appreciated.
    Thanks,
    Zach
    Software Engineer
    OnWafer Technologies, Inc.
    www.onwafer.com
    Attachments:
    icon.zip ‏3 KB

    I'm using Toolbar and ImageList ActiveX controls to implement toolbar functionality in a top-level VI.
    I designed the icons used in the toolbar with a 256 color palette. When I initially added the icon images to the ImageList control and ran the VI, the icons were properly displayed in the toolbar, as expected. After saving VI, exiting LabVIEW, and reloading, it appears that a different palette has been applied to the images in the ImageList control. I'm attaching a screenshot of the problem as well.
    Has anyone encountered this type of problem before? Any suggestions you provide will be greatly appreciated.
    Thanks,
    Zach
    Software Engineer
    OnWafer Technologies, Inc.
    www.onwafer.com
    Attachments:
    icon.zip ‏3 KB

Maybe you are looking for

  • Inserting Rows in a QueryDataSet

    I use Oracle JDeveloper 1.1. When i try to insert a DataRow in a QueryDataSet, works al lfine, bute the DataRow is at the end of the DataSet. I need a methode to insert a DataRow an the top of the QueryDataSet. Is there any way? Thnks for help.

  • Problem in sorting of maintanence view contents-

    Hi , I have created the maintanence view for one DB table in the dictinory.the view contains the fields as floows. CUPNO  CUPNAME  GUPNO  GUPNAME. Data it is displaying correctly.But user want CUPNAME and GUPNAME should be in the sorted format(alphab

  • Intensify as external editor: how, and how well, does it work?

    Intensify from developer macphun I have assigned as an image editor in iPhoto Preferences/Advanced.  In iPhoto when i click on Edit the image opens in Intensity and can be edited.  Unfortunately, saving after editing the image presents a standard fil

  • Why jws doesn't start when i use jsp as dynamic jnlp?

    hello everyone, i use a jsp as dynamic jnlp to resolve the relative codebase problem,but jws can not start. while i use jnlp, there is no problem.i check the http head the jsp reterned,it seems no problem (it returns "application/x-java-jnlp-file" co

  • I can not access preview mode in safari

    Choosing file > Preview takes me somewhere else and I can not access preview mode at all. Every time I select preview it takes me to some strange site with att and my first name in it. Very Frustrating. I am using the latest upgrade for Muse 2014, so