Problem with image returned from getGeneratedMapImage method

I'm a newbie as far as map viewer and Java 2D goes....
My problem is the java.awt.Image returned from the getGeneratedMapImage method of the MapViewer API. The image format is set to FORMAT_RAW_COMPRESSED. The image returned is of poor quality with colors not being correct and lines missing. I'm painting the Image returned from this method onto my own custom JComponent by overriding the paint() method...
public void paint( Graphics g )
Image image = map.getGeneratedMapImage();
if ( image != null )
g.drawImage( image, getLocation().x, getLocation().y, Color.white, this );
If I take the xml request sent to the application server and paste it into a "sample map request" on the map admin website (along with changing format to PNG_STREAM) my image renders exactly how I expect it to.
Anyone have any idea what I need to do to get the java.awt.Image with format set to FORMAT_RAW_COMPRESSED to render correctly. I was hoping to get back a BufferedImage or a RenderedImage from the getGeneratedMapImage call but I'm getting back a "sun.awt.motif.X11Image".
Will downloading the JAI (java advanced imaging) from sun help me at all?

Joao,
Turns out it is related to colors. I'm dynamically adding themes, linear features and line styles. I ran a test where I changed the color being specified in the line style from magenta (ff00ff) to black. When I changed the color the linear feature would show up. It was being rendered as white on a white background when I was specifying it to be magenta. I'm specifying another linear feature to be green and it is showing up in the java image as yellow. This doesn't happen when I take the generated XML from the request and display it as a PNG_STREAM.
Any clue what is going on there?
Jen

Similar Messages

  • Problem with calling dispose() from static method

    I have one class, where I have this:
    EditorWindow.disposeWindow();and class EditorWindow, where I have static method
    protected static void disposeWindow() {
        dispose();
    }But, dispose() cant be called from static method. Is there any way to hide or close the EditorWindow window?

    kaneeec wrote:
    I dont have references of these windows, because it would be too difficult. They are created just by new Window().setVisible(true);It's not difficult:
    Window w = new Window();
    w.setVisible(true);Now you have a reference (w) to your window that you can later call dispose() on.
    w.dispose();dispose() isn't a static method, so you have no choice but to call it on a specific instance.

  • Having problem with images imported from photoshop

    I am totally new to Fireworks, I am redoing a site that was done using CS2, that is GoLive, Photoshop and Image Ready. I wanted to begin familiarizing myself with Fireworks by starting with using it to make all the web images for the site (jpgs, pngs, etc). It started well but after a while I started getting strange results from FW when I imported PSD files. The PSD imports fine into FW but when I want to "preview" or do a "2-UP" and see what it looks like as a jpg or png I just get a blank image where the jpg or png is supposed to be. However if I "export" the jpg it does get exported, but I would like to preview it to see what the quality is. This doesn't happen every time but at least 50% of the time in the last 2 days, and there seems to be no rhyme or reason behind why it works with some images but not others.
    Another thing is that if I add a layer effect to the image such as "inner glow" to the PS image, and then flatten the image to make sure it gets exported to FW, it doesn't get exported. It is as if I never added the layer effect in PS.
    Any help on these two issues would be greatly appreciated and help me to continue in perservering with FW.
    VL Branko

    I don't think I've cracked open Bridge since upgrading to CS5/CS6, and I'm hesitant to start today! I'm therefore kind of assuming that you're starting with PSDs and opening them up in Fireworks. (If you're not doing this, give it a try.)
    Regarding the 50% failure of Preview and 2-Up modes, I was thinking that saving the PSDs as native Fireworks PNGs—within Fireworks—might eliminate that problem. It's hard to imagine Fireworks not previewing its own file format, but easier to imagine it failing to properly preview a PSD file. And again, perhaps File > Image Preview might work better for you.
    As far as the "inner glow" issue: 1) Be sure to add it into the PSD before importing into Fireworks, and 2) If it doesn't show up, have a look at Filters within the Properties panel for the selected object; you could try selecting Inner Glow within ‘Photoshop Live Effects’ or try out Fireworks' own native Inner Glow filter effect.
    Other than for the purpose of familiarizing yourself with Fireworks, you may want to consider why you'd use Fireworks for these graphics, if they were originally created in Photoshop. Small changes in graphic appearance are always possible when moving between applications. For example, Photoshop is color managed whereas Fireworks is not; you therefore might notice a small shift in saturation or tonality between the two applications. Whether this is a concern depends on your final output goals.

  • Problem with images disappearing from project

    I have inserted a number of images into my Robohelp 9 project topics using the Insert >> Image function.  Typically the images were stored on my hard drive on my pc, but some I pulled from a shared network drive that were prepared by other people.  They seemed to load into the project OK.  I had them grouped in a about 5 different robohelp folders to keep them organized so after I would insert, complete my topic and save.  I would move the images to their respective folder.  This was fine for a while,  I had no problems generating printed .pdf documentation, making changes to my topics, etc.  But now the images keep disappearing from the Robohelp folder structure and the printed documentation.  I can see the images when I open up and view the topics.  I can also see them when I look out onto the drive on the computer.  However, they do not show up in the Robohelp  Project Manager and are not included in my printed output.  I keep re-inserting them, but they continue to disappear. 

    Hi there
    Certainly it won't hurt anything to add the images to baggage files, but I'd be shocked to find that solves the problem.
    If an image has been used in RoboHelp, it should be present in the project. End of story. The fact they seem to be disappearing seems to suggest that maybe something has gone awry with folder naming or image naming or the project in general.
    So what version and flavor of RoboHelp are you using?
    RoboHelp 10, RoboHelp 9, RoboHelp 8, etc.
    RoboHelp HTML, RoboHelp for Word
    Cheers... Rick

  • A problem with 3 exceptions from 1 method!!!

    I don't like it and I need advice on how to avoid it. I have been given an interface and am required to use ech of its methods. Here is what happened...
    The interface declares that when a record is searched for in the database and cant be found then a database exception must be thrown.
    When a operation is performed on a record it gets locked with a lock cookie and this cookie must be the same when the lock is released at the end of the operation or a Security Exception gets thrown.
    The file accessing itself throws IO exception which ofcourse has to be handled too.
    So far I have done the following(data level). I have a general databaseException which is a parent to all database exceptions. This means my Security and RecNotFound exceptions can be caught by one exception as they bubble up the stack. My IOException gets converted to a runtime exception and will be converted back to a checked exception in the GUI layer where I cater for all exceptions (The user does not see them).
    Moving on....
    In my service layer layer I have a business Exception to all business logic errors. Here is why it gets tricky...
    A record can not be booked if it is already booked. So I have a bookedRecException and the booking process involves locking the record(throws databaseException as mentioned). I also catch my RuntimeIOExceptions and throw them in my service layer up the stack as an IOException which gets handled in the GUI.
    As you can see this does not look good and I want to fix it. I thaught of making my databaseException into a IOE my service interface methods are all throwing DatabaseException AND IOExceptions.
    Edited by: Yucca on Apr 2, 2009 8:37 PM

    Yucca wrote:
    morgalr wrote:
    So what you are saying is: you don't want to deal with all the different exceptions?
    No what I am saying Is it's the SCJD and I am trying to avoid messy code with 3 exceptions. I am very much for custom exceptions where having a strongly typed exception tells you enough just by the fact that AlreadyBookedRecordException in your stack explains it all.That is not apparent from you post, what you seem to be saying is that you don't want them. In any case I've never found it messy to handle all exceptions individually, nor have I found it messy to use the method I mentioned.

  • Problems with image conversion from InDesign to PDF

    My images look posterized when I convert from InDesign to PDF. Any ideas about this?

    That'd be in the export settings not in Reader. Ask in the InDesign forum, they'll probably know better.

  • Problems with image disk from Idvd

    Hi everyone, I've burned some Idvd projects, and before throwing those projects to the trash, i've saved them as an image disk.
    Today, when I burn image disk, it burns, but when I play it on a dvd deck the movie doesn't exist.
    When I check on my Imac, it shows me the dvd with a file burned on it, but doesn't play like a dvd.
    What's going on ?
    Thanx for answering
    Steve

    OK OK I've forgotten to use the "search" option.
    I think I've found the answer, I HAVE TO USE DISK UTILITY to burn an image disk, and not :
    Open the new dvd
    drag and drop the image disk to burn
    and click the "burn" button on the top right of the window.
    Grrrrr
    Here is a post with the answer.
    http://discussions.apple.com/thread.jspa?messageID=7907583&#7907583
    Sorry for the inconvenience
    steve

  • My daughter's older Ipod Touch is having a problem with images becoming pixilated when taken from an e-mail and placed into her camera roll. ( She wants to put on Instagram ) Any help?

    My daughter's older Ipod Touch is having a problem with images becoming pixilated when taken from an e-mail and placed into her camera roll. ( She wants to put on Instagram ) Any help?

    I think that may be a consequence of the email provider she is using. Some services (AOL is one example) inspect and modify email attachments, particularly photos, resulting in reduced resolution compared to the email that was sent.
    The iPod does not do this. The resolution of the picture in the email she receives will be identical to what is imported.

  • Problems with image scaling

    I'm facing a real problem with image scaling
    I've used several algorithms but it all has defects but the most common thing is the out of memory error after several enlargments...
    does any one know a solution...
    note:
    I've used several packages to do so,but I'm looking for a solution from the jdk itself
    JAlexscorpio

    Did you take into account that the getScaledInstance() -method creates a completly new Image?
    So if you use it like in
    ImageIcon icon1=new ImageIcon("Blah.gif");
    ImageIcon icon2=new ImageIcon(icon1.getImage().getScaledInstance(400,400,SCALE_FAST);
    you will end up with 2 different Images which have their own data and memory requirements.
    even if you use something like
    ImageIcon icon1=new ImageIcon("Blah.gif");
    Image i=icon1.getImage();
    icon1.setImage(i.getScaledInstance(200,200,SCALE_FAST));
    You will need enough memory to store the data for the original image, as well as the data for the scaled
    version of the image, at least for the time that it take the JRE to create the scaled version. You never know when the garbage collector kicks in to delete you old data so it could be that this takes some time and until
    that moment your memory is not available. If your now doing several of the scaling operations, and there is no chance for the garbage collector to do its work, you will run out of memory.
    I hope that might help, if not feel free to post again

  • Problem with images opened in Photoshop CS 5

    Hi, I have a problem with images that I open in Photoshop CS 5. F. ex. I opened
    the following image:
    The image appears with a purple color in Photoshop. If I hover over the image
    with a tool like lasso, it temporarily regains it´s original color. The image mode is RGB Color, 8 Bits/Channel.
    I resetted the start settings of Photoshop with the CTRL-Shift-Alt-combination, which had no effect.

    The confusion arises from the imprecise error message in the Preferences > Performance dialog box, to wit:
    OK, that seems to be open to misunderstanding indeed.
    The video card: Citrix Systems Inc. Display Driver.
    Could not find a list for CS6 specifically, but the card may fall short.
    http://helpx.adobe.com/photoshop/kb/tested-video-cards-photoshop-cs5.html
    If I invoke View > Proof Colors, the only thing that changes is that the text in the brackets
    Also if you set View > Proof Setup to something different?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by keeping command-alt-shift/ctrl-alt-shift pressed while starting Photoshop, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)?

  • Problem with image gallery

    Hi to all.
    With ios 5.01 I have a little problem with image gallery. As you can see I have only 1 image, but there is always this **** message "download 0 of 46) (sorry, but I'm Italian )
    I've removed my icloud account from settings, but there is nothing to do, this message don't goes away. What I can do? Thanks in advance

    Hello,
    Just adding a gallery I want to do the same slideshow WoodWing's, but in InDesign, if anyone knows of?
    Thank you
    Link video slideshow WoodWing's: http://www.youtube.com/watch?v=Xt6gNaEZ0-M&feature=relmfu
    The first slideshow shown

  • Problem with controlling Annotations from Excel VBA

    Hi,
    I have a PDF document that has plenty of sticky notes attached to it. These sticky notes have been added by multiple authors on all pages of the document. I am trying to import the contents of these sticky notes, their author and the page number to an excel spreadsheet.  I am using Excel 2007 and Acrobat Professional 9.0.
    This is the code that I am currently using to import the sticky notes, but the problem that I am facing is that when I run the macro -
    Same sticky note contents, author and page numbers are imported multiple times
    Not all sticky notes are imported, only some of them appear in the final excel spreadsheet
    When I compare the number of sticky notes to that in the original PDF file, the number is correct. But the content is repeated content and that is the reason why only some of the sticky notes are imported.
    This is an activity that I need to do on regular basis and the number of sticky notes that I need to import to excel may range between 100 to 200. It is really difficult to do this task manually, so an excel VBA macro could prove really helpful.
    Sub ImportComments_Click()
    Dim Fpath As String
    Dim WordObj As Object
    Dim wbkOutput As Excel.Workbook
    Dim iRow As Integer
    Dim i, j, k As Integer
    Dim lRet As Long
    Dim objAcroAVDoc As New Acrobat.acroAVDoc
    Dim objAcroPDDoc As Acrobat.AcroPDDoc
    Dim numPages As Long
    Dim lAnnotscnt As Long
    Dim Subtype As String
    Dim NumComments As Long
    Dim AcroApp As Acrobat.AcroApp
    Dim objAcroPDPage As Acrobat.AcroPDPage
    Dim annot As Acrobat.AcroPDAnnot
    Sheets("Defect Log").Select
    Range("L3").Activate
    Fpath = ActiveCell.Value
    Sheets("Defect Log").Select
    Range("A1").Activate
    i = 0
    Do While (Not (IsEmpty(ActiveCell.Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 1).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 2).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 3).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 4).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 5).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 6).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 7).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 8).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 9).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 10).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 11).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 12).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 13).Value)) Or Not (IsEmpty(ActiveCell.Offset(0, 14).Value)))
    i = i + 1
    ActiveCell.Offset(1, 0).Select
    Loop
    iRow = i + 1
    Set wbkOutput = ActiveWorkbook
    lRet = objAcroAVDoc.Open(Fpath, "")
    Set objAcroPDDoc = objAcroAVDoc.GetPDDoc
    numPages = objAcroPDDoc.GetNumPages()
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(0)
    For k = 1 To numPages
    lAnnotscnt = objAcroPDPage.GetNumAnnots()
    For m = 0 To lAnnotscnt - 1
    If lAnnotscnt = 0 Then Exit For
    Set objAcroPDAnnot = objAcroPDPage.GetAnnot(m)
    If (objAcroPDAnnot.GetContents <> "" And objAcroPDAnnot.GetSubtype = "Text") Then
    Cells(iRow, 5).Value = k
    Cells(iRow, 2).Value = objAcroPDAnnot.GetContents()
    Cells(iRow, 11).Value = objAcroPDAnnot.GetTitle()
    iRow = iRow + 1
    End If
    Next m
    Set objAcroPDPage = objAcroPDDoc.AcquirePage(k)
    Next k
    lRet = objAcroAVDoc.Close(1)
    Set objAcroAVDoc = Nothing
    Set objAcroPDAnnot = Nothing
    Set objAcroPDPage = Nothing
    Set objAcroPDDoc = Nothing
    End Sub

    Make sure you are current with 9.x patches, just on general principles.
    The code seems fine – nothing jumping out at me.
    You can also look at using the JSObject methods and trying this via the JavaScript stuff – that will give you more access to the Annotation information…
    From: Adobe Forums <[email protected]<mailto:[email protected]>>
    Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>>
    Date: Thu, 24 Nov 2011 04:25:12 -0800
    To: Leonard Rosenthol <[email protected]<mailto:[email protected]>>
    Subject: Problem with controlling Annotations from Excel VBA
    Problem with controlling Annotations from Excel VBA
    created by apreeti<http://forums.adobe.com/people/apreeti> in Acrobat SDK - View the full discussion<http://forums.adobe.com/message/4044740#4044740

  • Problems with 'Order Prints' from Aperture 2.1.3 Mystery borders

    *Some background:*
    I've been using Aperture for about 3 months now, importing most of my iPhoto library into the program. I have only recently started shooting in RAW format, most of my photos image files are in JPG format. In the past, I've had no problems with obtaining prints from within iPhoto or to a limited extent Aperture. So, far as I know my program is up-to-date. I have 2 plugins installed: Aperture2twitter and *flickr export Lite* both of which work acceptably.
    *The problem:* I ordered 317 4×6 prints from my aperture library.
    Every photo has a 1/4″ border on both sides of the image, i.e. the printed image is only 4×5 1/2″. I have never ordered this quantity before, but I don’t believe that was the problem, it appears that the processing machine was misaligned and no one reviewed the prints prior to shipping.
    I tried again, on 4 different images ... all JPG files with 3 out of 4 were OK, but one exhibited the "border" issue.
    I haven't a clue what is going on here. Apple implied +(via email)+ that I would have to individually crop every photo to ensure proper aspect ratio. This makes no sense to me at all, as I have never had this kinda problem before.
    Could the plugin(s) be interfering with the s/w? Is there a trick to having photos printed from within Aperture that was not present in iPhoto?
    Any thoughts on what the problem is would be greatly appreciated.
    Thanks
    -john

    I believe that I've solved this problem, with the help of the folks at Apple who handle Aperture tech support using the Aperture support ID that came with the product.
    So the short answer is: Aperture print services REALLY DO REQUIRE the image to be cropped (constrained as they say) prior to the data being sent to Apple Print services.
    Here is the link that describes cropping http://support.apple.com/kb/HT1993?viewlocale=en_US
    The process as described is cumbersome, but the support tech pointed out that in Aperture, crops are 'non-destrutive' and can be undone simply by removing the check mark on the Adjustments tab of the image you crop. *This means that you do not have to make a duplicate image for cropping.*
    So, here is the process that I arrived at to ensure that my "order prints" job turned out:
    1. create an album of all the photos you want to submit for printing.
    2. for each image call up the Crop HUD by pressing 'c' on the keyboard.
    3.select the aspect ratio that you want for your photo. Make sure that it does NOT SAY Master Aspect Ratio, or Main Display Aspect Ratio.
    4. Crop the photo
    on the adjustments tab you can see the X and Y data and Height / Width information which can be undone.
    5. Submit your print request to Apple for all the cropped photos.
    When the prints arrive, you can compare the prints with the submitted photos. They should all be good. You can then delete the album (since it really is not a physical thing) or keep it for reference.
    It all seemed a bit arcane to me, as I never had to worry about this in iPhoto. It must be that iPhoto sends different data than Aperture. I have just received 200 + prints back from Apple Print Services with about 98% success rate. I just have to adjust my thinking and my process when dealing with Aperture.

  • Problem with NEF files from Nikon D4

    Hi everyone. I find a problem with nef files from my Nikon D4. When files are open in ViewNX2 (free viewer software from Nikon) they are perfect, as shooted... but in ACR they are very different... I use LR4 or CS5 with ACR 6.7 and the difference seems to be linked at D-Lighting function. My impression is that ACR dont read this option and picture are very very dark that original shootings. Anyone have this problem?

    This question used to be answered in the FAQ before they revised it.  So, here we go again.  ViewNX is capable of reading all of the in-camera settings such as, camera profile, saturation, sharpness and other settings.  It is capable of doing this because it is Nikon Software, and they have the ability to program it to read the settings from their raw images.  Lightroom does not read those settings from Nikon cameras or any other brand of camera.  Part of the reason is that different camera makers store those settings differently.
    When I first started using Lightroom I adjusted one of my images that represented what I normally shoot until it looked the way I wanted it.  Then I saved those adjustments as my default settings for the camera.  From that point onward, whenever I import images those settings are automatically applied, and it takes care of the vast majority of my images.  Of course, I still have to make individual adjustments.  But my default settings greatly reduce the amount of how they work that I have to do.
    Active D-lighting is is one of those features that Lightroom does not recognize.  You would be well advised not to use it, or else create a preset to simulate its effect.  It will provide no benefit to your Lightroom work.
    This is a fundamental difference with Lightroom, and something that must be understood and implemented if you are going to use the program effectively.
    I realize this question was asked in the ACR forum and I referenced Lightroom throughout.  But the principle is the same, and the recommended procedure is the same.

  • Experiencing problem with image display in LR5

    I have an intermittent problem with images displaying and exporting in LR. It just began a couple of months ago and is totally random - will do it with RAW (CR2) or JPG. It displays this way in all modules - Library, Develop, Slideshow....The image displays fine in a non-Adobe image viewer (Faststone or Windows Viewer). I've reloaded LR5 and PSCC and is still persists. I know the image file is fine. It also has begun effecting older images that were showing up just fine a while ago. I just loaded about 200 images and maybe 3 or so have this viewing problem in LR & PS. Has anyone else experienced it and have a suggested fix? My graphics card has the latest drivers and shows no problems with other applications. Here is the same image - one a jpg export from Lighroom, the other a save as jpg from Faststone. HELP!

    This is almost always a hardware problem, causing corruption of the file. The difference you see between Lightroom and other software is that Lightroom is accessing the full RAW image, while the other software is trying to read the embedded JPG preview.
    To figure out exactly what hardware is the problem, you need to try different transmission paths and hardware ... different camera cards, different card readers or USB cables/USB ports, different hard disks, etc. Eventually you should be able to isolate the problem.

Maybe you are looking for

  • ORA-12505 - AIX - ProC/C++ - [AIX environment not properly set to NLS?]

    I DO need some help here! I have a C++ program accessing an Oracle 8.0.5 database ( which is set up for american_america.weiso8859p1 as the default language PLUS one more being: brazilian portuguese_brazil.weiso8859p1. When I log to the server which

  • How can I get a list of users with reset password ability?

    We are trying to tighten our security, but thanks to the environment we are in this is a bigger task than it should be. As part of this I have been asked to get a list of users who have the ability to reset other users passwords. there are the obviou

  • Hi I need a report

    Hi, I am having two tables as following I need a difference report as following. I was used to write a minus query to find the differences but I am asked to show a report as following. So can any one help me in this regard. Table1 ID Name 1 Nancy 2.

  • Iphoto says damaged or incomplete

    Iphoto says damaged or incomplete Help please. Thanks!

  • Need help with new Mac Pro (2012)

    Hi for everyone! Few days ago, I bought a new Mac Pro (Mid 2012) MD770LL/A for my recording studio. The workstation is really powerfull and silent, but it has one major problem for me: computer comes with pre-installed Mac OS X 10.7.3 Lion, and as I