Color (RGB)

Hi,
I'm struggling to get the color of my JPEG image right.
I'm using JGeoRaster.setDefaultRed/Green/Blue(int) before I create the RenderedImage to set the layers, but nothing changes.
Code sample:
JGeoRaster jgeor = JGeoRaster.load(mySTRUCT);
jgeor.setDefaultBlue(myblue);
jgeor.setDefaultGreen(mygreen);
jgeor.setDefaultRed(myred);
RenderedImage ri = jgeor.getRasterImage_mergeblocks(conn,pyramidLevel,x,y,width,height);
if(ri!=null) {
Graphics2D graphics2d = (Graphics2D)myCanvas.getGraphics();
graphics2d.clearRect(myCanvas.x, myCanvas.y, myCanvas.width, myCanvas.height);
AffineTransform at = AffineTransform.getTranslateInstance(0,0);
graphics2d.drawRenderedImage(ri, at);
What am I missing here?
Thanks
Cobus

Hi Cobus,
Have you tried using getRasterImage(...) instead of getRasterImage_mergeblocks(...)?
As a general note, we consider the GeoRaster Java functions to be internal, which means that they can be changed, renamed, or removed at any time. For this reason, we do not recommend that users invoke the Java functions directly. In fact, this is exactly the case with getRasterImage_mergeblocks, which has been replaced in use by getRasterImage.
Instead, we highly recommend that you use the PL/SQL GeoRaster functions defined in the PL/SQL SDO_GEOR package. In particular, the following functions may be of interest to you:
SDO_GEOR.setDefaultBlue
SDO_GEOR.setDefaultRed
SDO_GEOR.setDefaultGreen
SDO_GEOR.getRasterSubset
SDO_GEOR.exportTo
These and all other external GeoRaster features are described in detail in the GeoRaster Documentation at
http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10827/toc.htm
If you have a strong need to implement your application in Java, then you can use the JDBC (java.sql) and ODBC (oracle.sql) Java API's to invoke the PL/SQL functions from within Java.
Hope this helps,
Sophia

Similar Messages

  • Background Color - RGB Value

    Hello,
    I have embedded a video in this post. I have a FCP background color RGB Value 102, 151, 202. YOu can see the bad results in the video. The text almost starts out gray, then fades into white - which it should just simply fade in.
    If I place the background in Motion - I don't have this issue - but I use Motion for titling.
    Keep in mind, this is simply a test project, not the real project i was working with, but I replicated the issue. Any help would be greatly appreciated.
    http://web.mac.com/chris.ducasse/mtest/test.mp4

    This is probably bug 777312. Call Support for the latest info on this bug and for help getting it fixed.

  • Can I get UHD (3840x2160p) @60Hz with full 8bit color (RGB/4:4:4) on HDMI2.0?

    With the latest release of UHD (3840x2160p) TVs, we get some questions about the support on HDMI2.0.
    And especially about the support for full color in UHD (3840x2160p) at 60Hz.
    The first gfx cards supporting HDMI2.0 are the Nvidia GTX 970 and GTX 980 cards.
    These cards support UHD (3840x2160p) @60Hz refresh rate with full color (RGB or YCbCr-4:4:4) if your display are able to support it.
    Some TVs support UHD @ 60Hz but with reduced color information (e.g. YCbCr 4:2:0) (Usually 24/30Hz full color is supported)
    Some TVs support UHD (3840x2160p) @60Hz refresh rate with full color (RGB or YCbCr-4:4:4) but only on one HDMI2.0 port.
    And some manufacturers don't document the capabilities very clearly.
    So what should we do to view full color UHD @60Hz over HDMI2.0  on a UHD TV?
    1.)   Check the TV manufacturer’s website if there is a newer firmware for your TV available.
    2.)   Check  the TV manual which HDMI port(s) can support UHD RGB/4:4:4 @ 60Hz.
    3.)   Check the TV manual (Samsung and LG) to see if there is a setting called "HDMI UHD (deep)Color", and set it to "On" .
           Check the TV manual (Toshiba) to see if there is a setting called "HDMI Input Mode" and set it to "Mode1".
           Check the TV Manual (Panasonic) to see if there is a setting called "HDMI Auto Setting" and set it "Mode2".
    4.)   Install the (Nvidia) gfx drivers and in the driver control panel setup the resolution to 3840x2180p @ 60Hz
    5.)   If you want to check if the color is reduced or not? Just open the http://i3.minus.com/ibyJcwdIniHUEs.png (100% zoom) and if you can read 4:4:4  clearly then the colors are not reduced.
    P.S.,
    Most TV manufacturers recommend using Hi-speed HDMI cables and preferably shorter than 3 meters (some say 5m).
    P.P.S.,
    I attached extracts from UHD TV manuals, where you can see the different UHD color information from some manufacturers.
    P.P.P.S.,
    DisplayPort v1.2 also supports UHD (3840x2160p) @60Hz refresh rate with full color (RGB) but most TVs don't have DP ports (I have only seen Panasonic offering DP1.2) .
    In some UHD TVs and Monitors you need to enable "Multi-stream" in the TV/Monitor settings menu to enjoy 60Hz UHD.
    I haven't come across any UHD monitors with HDMI2.0 yet.

    Since HDMI2.0 gfx cards and UHD TVs are quite new, apparently some TVs might not work with PC hardware 100% yet.
    Some TV firmware still have some bugs, therefore it's wise to contact the TV manufacturer as well.
    Apparently with some Samsung TVs you also need to rename the input to "PC" or "PC DVI" to get full color support.
    You can read more info and user experience in these forums:
    https://forums.geforce.com/default/topic/777438/geforce-900-series/gtx-980-and-samsung-4k-tv-hu8550-60hz-works-but-not-getting-4-4-4-full-rgb-output/
    https://forums.geforce.com/default/topic/778627/uhd-tvs-providing-4k-60hz-with-4-4-4-choma-hdmi-2-0-/
    http://www.avsforum.com/forum/166-lcd-flat-panel-displays/1698761-tv-s-capable-4k-60hz-4-4-4-pc-nvidia-900-series-gpu.html
    http://hardforum.com/showthread.php?t=1837209
    Another test picture to test color reduction:
    http://cdn.avsforum.com/b/b4/b4a44044_vbattach208609.png

  • Eyedropper tool - Makes color RGB from CMYK image.

    I made an image CMYK in photostop, and then placed it in an indesign file. When I used the eyedropper tool to grab a color from that graphic, the eyedropper tool made that color RGB. Our printer only accepts CMYK. So, I am a bit confused. How can I fix this? Or will this be a non-issue?
    Thanks

    I can think of three possibilities for what happened.
    If the image is missing (check the links panel) the eydropper is sampling the RGB screen preview.
    If you pasted the image from Photoshop instead of Placing it, you only pasted the low resolution RGB screen preview, and you have more problems than the eyedropper color.
    If you opened the color picker by double-clicking on the color box, then said OK while the cursor was in one of the RGB fields (the default state), the color was converted from CMYK to RGB.
    The only time RGB is a non-issue is when you are outputting on a RGB device (screen or desktop printer). If the printer said he wants CMYK you need to give him CMYK, or pay him to fix it.
    Peter

  • Linearize working space & color rgb

    Hello,
    i'm trying to understand all working space options, that i didn't before.
    I've read the Color management workflow after effects help.
    So i'm working on a project in rec709 working space, but when i turn on linearize working space, i can't manage to find my colors back.
    FOr exemple here is my color in photoshop, and after effects with linearize working space turn off :
    but i turn the option ON, it's the same color rgb numbers, but the displaying color is far form original :
    How to find back my original beautiful and deep green, that is now a light fade green ?

    All of that stuff is very complicated. Because as you say, who can tell on which device my client will look my film
    In my case, what i didn't understand is why a RGB value is not the same in linear or non linear workspace.
    If i copy paste the code, it won't be the good color, but if i import the same color form a psd or ai file, it will look ok.
    So if i understood well, in linear, the curve rises from the non linear curve. And colors that are in the middle of the curve rise as well. We have to make it go down if necessary.
    So i understand that when you import the file, after interpret in the good way color info.
    So for a color created in after, if i want the good color, i found that i have to apply the color profile converter :
    and it will look the good way
    As i read on other post Re: Question: Linear Workflow in AE CS4 :
    "For imported footage, this conversion is automatically done for you, but for values created inside AE there is no way of knowing if you want to enter these as values in a linearized space or in a gamma encoded space."

  • Average filter but the image is gray and not color RGB

    Hi,
    i use this code for an average filter 3x3, the result is the image whit average but gray and not RGB color.... why??
    thanks in advance
        public void Average()
            int values[]=null;
            int input2d[] = new int [image.getWidth()*image.getHeight()];
            int [][] output2d=new int [image.getWidth()][image.getHeight()];
            image.getRaster().getSamples(0, 0, image.getWidth(), image.getHeight(),0,input2d);
            for(int y=0; y < image.getHeight(); y++)
                for(int x=0; x < image.getWidth(); x++)
                    int count = 0;
                    int average=0;
              values = new int[5*5];
                    for(int s = 0; s < 5; s++)
                        for(int r = 0; r < 5; r++)
                            try
                                values[count] = input2d[(y-2+r)*image.getWidth()+(x-2+s)];
                                count++;
                            catch(ArrayIndexOutOfBoundsException e){ }
                    //trovo il valore medio dell'intorno 5x5
                    for (int temp=0; temp<count; temp++)
                        average+=values[temp];
                    int valpixel=average/count;
                    output2d[x][y]=valpixel;
            image2 = new BufferedImage(image.getWidth(),image.getHeight(), BufferedImage.TYPE_INT_RGB);
            image2.getGraphics().drawImage(image,0,0,null);
            for(int y=0; y < image.getHeight(); y++)
                for(int x=0; x < image.getWidth(); x++)
                    image2.getRaster().setSample(x, y, 0, output2d[x][y] );// componente R
                    image2.getRaster().setSample(x, y, 1, output2d[x][y] );// componente G
                    image2.getRaster().setSample(x, y, 2, output2d[x][y] );// componente B
        }

    Can hel me please!!!

  • Is there a way to change the individual color (rgb) channels of a clip, like in the previous version of iMovie?

    I loved this feature in the older versions of iMovie for editing my underwater scenes to get ride of the greenish tint.  Now I only see a color temperature slider adjustment in the new iMovie, but that doesn't give me enough control.  Is there a way to get each color channel edit back?

    iMovie version 10 doesn't have the individual RGB gain controls that version 9 does.
    You'll find that version 9 was left behind in your Applications folder when you upgraded to 10.
    Matt

  • Convert Colors RGB to CMYK something i don't understand.

    Hello!
    I'm still "fighting" with maximum TotalInk. There is the problem. Indesign have background and overlaying image with effect - Multiply. So it's extremely hard to avoid not exceed maximum ink. Indesign don't provide normal way to do it and i start to torture Acrobat for that. First step was create Postcript file then distille it to RGB and then convert by Acrobat X Pro (Print Production/Convert Colors).
    Theoreticly everything worked out fine. Black text stayed black (which is miracle) and images went to RGB and back to CMYK. BUT...and i don't understand why - Convert to Profile with Perceptual didn't converted it same way as Photoshop. It still got some points which exceed TotalInk (i used profile with maximum 300). AND image has drastic loss of quality! What did i do wrong? I tried to make Preflight new fix which do same thing and it worked - no exceeds of limit but still BAD quality! What did i miss?
    Thanks.
    P.S. If something isn't understandable please ask, i'll try to make my point more clear (english isn't my first language).

    The 'create album' button is identical to File>New From Selection>Album (Command-L).
    Oddly enough, this gives different behaviour from File>New>Album...
    In other words it makes a new Album with the entire Project's-worth of images in it only if you had nothing selected. It's an assumption on the part of the developers - you've asked for a new Album containing the selection, but nothing's selected - do you throw up an error message (like the one when only one Version is selected), or assume that the user wanted everything.
    Personally I think Aperture should throw up a dialog box to keep things consistent, but I can see the reasoning behind it. And as long as we've got menu items and keyboard shortcuts for both, I don't really care.
    Ian

  • RGB Color management between Illustrator and Photoshop

    Hi,
    I have a color management issue when exporting JPGs from Illustrator and opening them in Photoshop:
    In Illustrator (file is in RGB mode), I have a logo which has the color RGB 0/0/153 and I export a JPG. When I open the file in Photoshop, the color is RGB 1/0154.
    I have activated Adobe CC Color Manegement via Adobe Bridge (option "Europe, Universal 3"), which should produce consistent results in all Adobe applications.
    So which is the color that is actually in the file? And what do I have to do to get the color I want (0/0/153) actually exported from Illustrator? I need this color to comply with corporate design specifications of my client.
    Since I have to produce a lot of files it is not possible to readjust all colors in Photoshop ...
    Thank you!
    Michael

    First, check to make sure that the RGB working colorspace is the same for both Illustrator and Photoshop.
    When exporting the jpeg from Illustrator make sure the 'embed' color profile is selected, and it is the color profile that is required for your client. If this is for web use, then sRGB is your best choice.
    When you open the exported image in Photoshop, make sure that the color settings for Photoshop are set to 'Preserve Embedded Profiles'. After you open the image in Photoshop, you can double check by going to Edit > Convert to Profile... The source profile should match the embedded exported profile from Illustrator. If these match, your RGB color values from Illustrator and Photoshop should also match.
    If the source profile does not match, cancel out of the 'Convert to Profile" and go to 'Assign Profile". Assign the profile that you embedded when exporting from Illustrator. Now Photoshop should have the same values as Illustrator.

  • JavaScript,sampling,RGB COLOR

    How to get the coordinates of one pixel of the sampling point RGB color?
    Example, the figure for the RGB value sampling tool:

    #target photoshop
    var doc = app.activeDocument,
    samps = doc.colorSamplers;
    for ( var i = 0; i < samps.length; i++ ) {
         var r = Math.round( samps[i].color.rgb.red ),
         g = Math.round( samps[i].color.rgb.green ),
         b = Math.round( samps[i].color.rgb.blue );
         alert( 'R'+r+' G'+g+' B'+b );
    alert ( samps[1].position );

  • How to change color from default black in JS and still retain fade effect?

    Hi, I have got some java script that fades in some text on loading. It is working but I cant seem to change the color and retain the fade in effect. Any ideas? I am using CS5.
    I think it is something in here that needs changing?
    <script language="javascript">
    col=255;
    function fade() { document.getElementById("fade").
    style.color="rgb(" + col + "," + col + "," + col + ")"; col-=40; if(col>20) setTimeout('fade()', 300); }
    </script>

    Try changing this -
    if(col>20)
    to this -
    if(col>90)
    and see what happens.
    Murray

  • Gray color background in PDF exported from Crystal Report not printing correctly in Digital Printer (CMYK)

    I am processing a crystal report on RAS server,and exporting it to PDF, using the RAS Dlls.
    Dim Report As ReportClientDocument
    Dim crExportData As New ByteArray
    Dim crExportType As CrReportExportFormatEnum
    crExportType = CrReportExportFormatEnum.crReportExportFormatPDF
    crExportData = Report.PrintOutputController.Export(crExportType)
    A gray background is applied to an object in crystal report, with RGB color code (216,216,216).
    On exporting this report to pdf, the color appears as required.
    However, when printing this PDF in a digital printer (uses CMYK color format), the color changes to Pinkish Gray.
    The color remains gray as required, in other printers.
    Is there any way to make the exported PDF CMYK compliant?
    Please help.

    From the info, I have no idea what version of .NET and CR you are using...
    How is the printing from the CR designer?
    How is the printing to another printer, say HP?
    Do you have the latest updates for Digital Printer (CMYK) installed?
    How does a plain pic with grey background print from a .NET app? (E.g.; is this a CR issue, or a framework issue? See:
    RGB to CMYK (Plugin) - Plugins - Publishing ONLY! - Paint.NET Forum
    RGB VS. CMYK: WHEN TO USE WHICH AND WHY - Crux Creative
    http://www.sumydesigns.com/2012/12/06/color-rgb-vs-cmyk-web-color-vs-print-color/
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
      Follow us on Twitter

  • Is there a way to disallow web pages to modify foreground color of elements if background of those elements was not changed as well (and vice versa)?

    I have very sensible defaults for my display; i.e. I have dark GTK scheme (dark gray background, light gray text) that suits me way more when working on my computer while it's dark around. I, however, like looking at web pages as how they were mean to be seen. Unfortunately, most of web designers don't think about anyone having non-default colors set up.
    Example one ( http://www.cedok.cz ):
    This site's CSS style has "color: rgb(45, 45, 45);" for the whole <body> but for <select> elements there is no "background-color" set. This means there is a select box rendered with dark gray background and dark gray foreground (text color). This is pretty badly readable (obviously).
    To mention one particular element from this site: e.g. <select id="ctl00_ContentPlaceHolderLevySloupec_HledaniMultiTab1_HledaniZajezdu1_ddlTypZajezdu">
    Example two ( https://support.mozilla.org/en-US/questions/new/desktop/customize/form ):
    On this page (where I'm currently filling in this question) the <textarea id="id_content"> has "background: ... rgb(255, 255, 255);" set, but with my default font color, this textarea is rendered as light gray text on a white background. Again, pretty unreadable (and eye-hurting).
    I can provide screenshots and more reasoning if needed.
    I'm asking if there is (or might be) an option (even disabled by default) or at least an add-on which would keep default colors unless both foreground and background colors were specified. I think this might make Firefox very usable for many people which like to have their default colors configured.
    In case you won't be able to help me by fixing this, could you redirect me to the right place where I could get this requested in a way that might be really possible to happen (bugzilla?).
    Thank you very much in advance.

    Thanks for the reply, but I'm sorry, no. I don't want any addon that customizes colors, I want to use default colors and only prohibit changing them unless both background and foreground colors are changed.
    I have made no color changes WRT to Firefox *only*, I just changed the default for the whole toolkit (gtk in this case). The thing I need is to disable changing *only one* property out of two ({back,fore}ground). Whenever the second one gets set as well, this new setting (both of them) may get reflected, but not before that. It'd be nice to keep this when changing the colors back (deleting the style), but that's not necessary.
    I hope that's understandable, feel free to ask for if that's not the case.
    To express what I mean a bit more precisely, see the attached image. In that image there are four textareas (one of the elements that gets affected by this). First one is a default one (which I want to have if the page has nothing set), the second one is nicely modified to fit for example to a blue-ish page (this one I like as well).
    Second row of textareas shows how the final element looks like if the page has only one of these elements set up. First one changes background without changing font color, the second one vice versa. Both of them are very badly readable, especially with low lighting around.
    This is consequently the same case when it comes to default page background which I cannot set at all, because too many pages have only "color:" set without changed background and that is completely messed up then. Going to extremes, I might mention all color-related modifications (see how ugly the borders look when the background is changed and nothing is done to these borders, their size and color is kept default), but I understand that's too much.

  • How to get background color of controls ?

    Hello everyone.
    How to get background color of controls ?
    When we use AWT/Swing,
    we can get background color of component by using Component.getBackground()
    It is regret that I can not find any method for such a method in JavaFX.
    And how do we detect the change of background color of controls ?
    Best regards.

    Hi Tadashi,
    try this.
    @Override
    public void start(final Stage primaryStage) {
        primaryStage.setTitle("Test ChangeListener");
        Button btn = new Button();
        btn.setText("change background");
        btn.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                primaryStage.getScene().setFill(Color.rgb(
                        (int)(Math.random() * 255),
                        (int)(Math.random() * 255),
                        (int)(Math.random() * 255)));
        StackPane root = new StackPane();
        root.getChildren().add(btn);
        primaryStage.setScene(new Scene(root, 300, 250));
        primaryStage.getScene().fillProperty().addListener(new ChangeListener<Paint>() {
            @Override
            public void changed(ObservableValue<? extends Paint> arg0, Paint arg1, Paint arg2) {
                System.out.println(
                        "old color: " + arg1.toString()
                        + ", new color: " + arg2.toString());
        btn.getOnAction().handle(null);
        primaryStage.show();
    }Peter

  • IMAQ FFT of a color image

     In LABVIEW 2011 Is there a way to do an IMAQ FFT on a color image? The only thing that seems to work is on gray scale images. When I try to use a color RGB(U32) image, the FFT vi errors out with "Invalid ImageType".
    Any suggestions?
     Thanks in advance.
    Solved!
    Go to Solution.
    Attachments:
    Resolution Decrease.vi ‏46 KB

     Thank you for the prompt reply Daniel.
     What we are attempting is a de-resolution of a hi resolution image to simulate what a 1-4 reduction in resolution using a fiber optic taper will look like to a customer without having to built a very expensive actual optical system. If it proves to be an acceptable resolution, then we can move forward. The point is we need a fiberoptic imaging system due to environmental issues prevernting having an actual camera up close to the work being inspected.
     So the idea is to convert the image to an FFT, remove any frequency component above the resolution we would see through the optical magnification, then recreate the image via a reverse FFT. Does that sound feasible or is there a simpler method of simulating a lowering of the resolution of an image? We can work on the gray scale image, as I believe this will prove acceptable for our demonstration. If color is required, we can talk about splitting up the color planes.
     Warm regards,
     Randy

Maybe you are looking for

  • Relevent to billing

    Dear SAP Experts, This is regarding the Inter company stock tranport order with billing. How can we get the PO price which was maintained manually in a PO for a material i.e PBXX into stock transport order billing as cost. Means, the purchase order p

  • How to work wih kmdocumentation iview?

    hi My requirement is need  to display the different documents from the diff sap systems in portal side. for this which iview i have to use and wat is the procedure? i never work with km. plz let me know from the basic level? Thankyou

  • Stock Widgets

    I seem to be having trouble getting a stock widget to work on my computer, either with MAC or Yahoo Widgets.  I had the Stock Ticker Tape but it suddently stopped working and all I can find is a MAC Fidelity widget, which is not that user friendly. 

  • How to repeat one test sequence step?

    Hi there, I've been testing the NI TestStand 4.1 evaluation system to see does it fit our company needs. It's almost what I expected to do except that I didn't manage to repeat only one failed step from the sequence and correct the report result. It

  • Query Regarding OCP  certification

    Hi.. I am planning on giving the OCP (1z0-043) certificates in a couple of weeks time. I am also planning to give the 11i Apps DBA (1z0-033) right after that. I have already cleared the OCA certificates a year ago.. Now, what i would like to know is