Fast tinting of an image.

Hi-- I'm trying to write a program that will have several hundred (or several thousand, if possible) sprites on the screen at a given time. I'm using a double-buffered VolatileImage. Every sprite is a copy of a single simple circle, but each will be a unique color that will be different for every frame. The sprite will also have an alpha component. My question is:
Since there will be so many sprites, I need a fast way (accelerated?) to tint each the sprite the color I need, without eating up oodles of memory. How do I do this? Is there a way to do this with Java? I'd think of using a simple white circle over a black background as an alpha mask for a blank image of the color I need, but it seems that Java2D's code for drawing and filling a box of the desired color is far too slow to draw 1000's of them for each frame. In addition, I want to make use of any availble acceleration for the masking process as well. Any recommendations?
Thanks,
tim

bump?

Similar Messages

  • LR 2.3 applies a green tint to RAW image AFTER making adjustments

    Hi all,
    Thanks for having this great forum, it looks like there is some great information here. I clicked around the LR threads and the FAQ but I haven't found anything applying particularly to my issue/question, though, and I'm hoping some of you can help me understand what is going on. .
    I have read about LR changing the colorcast on import, however in my case the images look fine after importing and processing. When I click BACK to an image that I have already processed, I am seeing LR 2.3 apply a green tint to it, and I have no idea why.
    What I am doing:
    -Import Canon RAW files into LR collection (images look fine, no abnormal colorcast)
    Develop tab:
    -I can click around the collection and view the images without any colors changing
    -Process an image to my heart's content (image color still looks fine)
    -Click to the next image and process the next one
    -Mouse-over on the previously processed image on the bottom filmstrip, and preview shows up on the Navigator pane (preview looks as the image was edited previously)
    -if I click to a previously processed image in the filmstrip, it will load into the center pane
         -while the processed image loads here, the green tint gets applied to the image
    -Color tint/green saturation has not moved from its previous position (even if it was moved during initial processing)
    -In order to correct it, I either have to adjust the color tint slider about 20 points away from green, or dial down the green saturation to compensate.
    Once I re-correct the image, I can click back to it again, and the mysterious green tint will no longer re-apply itself on this image.
    This happens to most if not all of the images in the collection. I have only processed one other RAW collection in LR, but I did not have this issue.
    I dont know what exactly is being changed to result in this green tint applying on its own, so I'm not sure if the adjustments I'm making are correcting it.fully.
    I hope I'm detailed enough in explaining what I'm seeing, and that it makes some kind of sense.
    Does anyone know what is going on here?
    Thank you!

    Hi John, thanks for the reply.
    Thanks, I'll look into the preferences in LR, although everything has remained mostly in its default settings. I've loaded JPG collections without seeing this either.
    Would monitor profiles matter in my case? I ask because I am simply clicking back to a previous picture in the strip. When I leave the picture it looks fine, and returning to it shows that image but with the green tint. I haven't gotten to the point of exporting/converting the image, or anything further.
    Some more information if it helps:
    Using MS Vista
    Using Canon Rebel XTi 400D
    I copy only the raw files from the memory card to a folder, and then point the LR Import to that folder.
    I will try replicating the issue on another computer in hopes to narrow it down. I am baffled.

  • How to tint a JPanel that paints an Image

    Hello all,
    I have a basic understanding of Java Swing architecture and the Drawing capabilities of the Graphics and Graphics2D classes. However, i am utterly confused how to implement a basic tint over an image.
    Overview:
    I have a GCard (Graphical Card) class that extends JPanel. This class contains a BufferedImage so that when the GCard is added to a higher-level Container, it paints the BufferedImage. What I want to do is tint that card image to a user specified color (let's say RED) via the GCard.setTint(Color.RED) method and then allow them to control if the tint is on/off via the GCard.setTinted(true) method.
    What I have:
    Currently, I have the following in my GCard.paintComponent(Graphics g) method:
         @Override
         protected void paintComponent(Graphics g) {
              int xPosition = 0;
              int yPosition = 0;
              if(image != null) {
                   g.drawImage(image, xPosition, yPosition, null);
                   if(isTinted() && tint != null) {
                        g.setColor(tint);
                        for(int x = xPosition; x < (xPosition + image.getWidth()); x += 2)
                             for(int y = yPosition; y < (yPosition + image.getHeight()); y += 2)
                                  g.drawLine(x, y, x, y);
         }All this does is implement a rudimentary tinting scheme by setting every other pixel in the panel to the tint color.
    What I want:
    What I'd like to see instead is a red haze over the entirety of the image. Much like the multiple item selection process that occurs when you select multiple things in a modern-day OS.
    How can i do this?
    From what I've read/thought out, I can either edit the actual image data to increase the level of the appropriate tint color, but I would prefer to be non-destructive to the image I'm holding in memory. I would prefer to imitate the 'layer' functionality of Adobe Photoshop where my image is the 'background' and I have a transparent panel that is tinted which can be switched on and off. Can I accomplish all of this in the paintComponent() method or will i need to add a JPanel (let's call it a tintPanel)to the GCard object and then add/remove that component from the GCard as necessary?
    Thanks for the help!
    -Pheez

    Something likeprotected void paintComponent(Graphics g) {
       super.paintComponent(g);
       g.drawImage(....);
       g.setColor(new Color(r, g, b, a)); // where a <1.0
       g.fillRect(aRectThatOverlapsTheImage);
    }db

  • Need a fast image viewer with slideshow and autorotating

    Hello everyone,
    I'm currently recycling an old computer as a digital photo frame. It runs LXDE.
    This computer is also used as a server on which we store our photographs.
    I need a fast picture viewer, with the following features:
    - fast processing
    - good rendering
    - image autorotation based on EXIF data
    - random slideshow with recursive browsing
    - GUI is preferred, or I need to find a way to add entries in PCManFM's right-click menu (any guidance is welcome)
    - ability to play video would be nice but is not mandatory
    I've tried many image viewers available in repos and AUR. So far only 2 of them are suitable in terms of speed: feh and qiv. But they are CLI-based (no big deal if I find a way to customize PCManFM file associations), and they do not support image autorotating based on EXIF (support has recently been implemented in qiv, but Arch's package is outdated).
    Please tell me if you know about a program that'd fit my needs.
    TIA.
    Last edited by brazzmonkey (2009-03-16 08:13:34)

    Inxsible wrote:
    rson451 wrote:
    Inxsible wrote:I would be interested in your search as well, because I currently use mirage and feh to set my wallpapers...but I am looking for something lighter than mirage, but one which can do rotation as well, so I dont have to connect my HDD to the windows machine, just to set some pictures right.
    Offtopic, but did you know feh has a right click menu?  Rotation is in this menu.
    Oh yes, I do know the right click. but I guess I never looked hard enough for the rotation as I do it very infrequently. Thanks for the tip.
    How would I set feh, so that when I double click a image file, feh would start up and show that image? If I can get that (and I haven't tried that yet), I guess I can get rid of mirage then.
    That's not an feh config, that's a config for whatever file manager you are using.  I'm not sure of the options you'd need to pass feh because I always run it on the command line.

  • Putting 300 images fast with space of 2 seconds?

    Hello, i have a total of 900(300 colored,300 grey,300lines) images from a model i makes and i want to make a video that uses those images and fades from one to another slowly.
    So i need to do something like this color image 1 goes to 3 second and the image2 goes to 6th second and goes on
    Grey image 1 goes to 2 second and the image 2 goes to the 4th second etc
    And each image stays therefore 1.25/1.50 seconds so they will fade instead of suddenly change.
    Do you have any idea how exactly i can do that fast without moving each image individually?

    Ok, so I think I get it. You want to start with the first of 300 wireframe images, then fade to the first of 300 grayscale images, then fade to the first of 300 color images then fade to the second of 300 wireframe images, then to the second of 300 wireframe images, then to the second of 300 color images, then to the fourth, fifth and so on.
    I'm assuming then that your total animation length would be 900 images shown for 1.5 seconds or 1350 seconds which is 22 and 1/2 minutes.
    The way you would go about this is to rename your images to that image 1, the wireframe version of the image, would be named something like mySequence_001.png and image 2, the grayscale version would be mySequence_002.png, and image 3, the color version would be mySequence_003.png and so on.
    You would then import all of those images into After Effects making sure that you did not import them as an image sequence. Then you would add all of those images to a composition with 001 at the top and 900 at the bottom. The composition would have to be 22;30;00 long. You would then select all layers, set the CTI to 1.5 seconds plus the duration of the transition between images (lets call it one second).
    With the CTI set now to 0;00;02;15 (assuming 30 fps) you would select Animation>Keyframe Assistant>Sequence layers, set the overlap to 1 second, set fade images and click OK.
    You'll end up with a slide show that fades between each version of each of your images before going to the next image in the sequence.

  • How do I open and view several images at once?

    I like to compare and see what images I've worked on and would like to have them all open at one time. In CS4 you could have up to 15 open and reduced so you could compare them at once and quickly move from one to the other. Is this possible in CS6?

    There's actually an instant way to see multiple images in CS6 without changing preferences. Choose Window > Arrange and pick one of the tiling options at the top. I think the new tiling options are a faster way to arrange images than what was available in CS4. If you don't like the tabbed/paned display at all, the Interface preference you want to turn off is Open Documents as Tabs. Whichever way you do it, the keyboard shortcut to flip between open documents (Command-`) still works.
    Sometimes it's faster to compare multiple images in Bridge, especially if you want to do a full-screen comparison (select multiple images in Bridge and choose View > Review Mode).
    If you don't want to see the background, choose Window > Application Frame to turn it off. Even when it's on, you can still see windows of other applications if you drag any edge to make the application frame smaller, exactly as you would in software like Apple iPhoto.

  • Image size and dimensions in Safari

    Is there a fast method of viewing image size and dimentions in Safari? I can open image in new tab and see its width and height in tab/window name. I can save image to the Desktop and see file size but it's not convenient. Is there some another way without opening an saving image somewhere like Control+click -> Properties?
    iMac G4   Mac OS X (10.4.3)  

    Pat,
    You don't need to set the image size as such. The image prints on the page according to two sets of criteria:
    1. Whether you set dpi to custom or a specific value, and
    2. The page margins you set either as a printing once-off, or as a new printing pre-set.
    For example, I print "arty" photos in a portrait format on A4 matte paper. Left and right margins are around 3cm, top margin is around 3cm, bottom margin is around 5 cm (all numbers are from memory...). I have a title just below the image.
    I created this particular page setup for a certain photo and liked it so much I saved it as another print preset. Any photo I print using that preset fits within the margins defined. The very next print might be the same photo, but this time printing A3+ on Ilford Galerie Smooth Pearl. Choose the photo, select the relevant print pre-set, print. Re-sizing is irrelevant - the print in both cases is coming from the processed raw at maximum resolution.
    Regards,
    Calx

  • When opening more image files in CC they are floating at the back, behind current open files

    When I'm working on an image or images (not docked) in PS CC on iMac OSX 10.9 Maverick, if I open a new file it does Not open at the front.  The newly opened file will open hidden/behind the currently open files yet if I got to the window drop down menu at the bottom it clearly shows the newly opened file is selected and thats the file I'm working on, even though its behind all the previously opened images and I can't see it fully .  Hard to explain but has anyone else found this issue?   Its strange and awkward when working at full speed.
    Any idea whats going on?

    So in this screenshot I have 2 bed images open, then I open the office-2 image but it doesn't open on top of the bed images but behind, yet you can see from the layers & nav bar that its the office-2 image were working on. 
    This issue can cause problems when working fast with lots of images. previously I've accidentally closed files that weren't finished destroying history snapshots etc.
    Any idea whats going on?

  • Embedded Color Profile is Lost When Content is Published to Web or Dragging Image Window on Desktop

    Hello, Everyone.  I have a question that I have struggled to crack on my own to no avail.  I hope someone here can help.
    I am trying to publish some images to the web using color corrected monitors, RAW format, and a color checker passport to create a perfeect color profile.  Here are the technical details and my workflow.
    Camera: Canon Rebel EOS Xsi
    Format: RAW + L
    Color Space: sRGB
    Color Checker: X-Rite ColorChecker Passport
    Monitor Calibrator: Spyder4 Pro, fully updated software
    Computer: Lenovo T420 ThinkPad
    Second monitor: Samsung LED SyncMaster SA350 (NVIDIA)
    Photoshop: v12.1 x64 (CS5.5)
    Photoshop Color Settings: Custom North America Web/Internet
    RGB: sRGB IEC61966-2.1
    CMYK: U.S. Web Coated (SWOP) v2
    Gray: Gray GAmma 2.2
    Spot: Dot Grain 20%
    Policies
    RGB: Preserve Embedded Profiles
    CMYK: Preserve Embedded Profiles
    Gray: Preserve Embedded Profiles
    After importing the image into Photoshop, I make sure the RAW space is set to sRGB IEC6 1966-2.1
    Use the eyedropper to select a neutral color one step away from pure white on the RAW image of the color checker, create and set the custom white balance.
    set the white balance
    Export the image as a DNG
    Load the DNG into the X-Rite ColorChecker Passport software to create a color profile
    Back to Photoshop
    Open the RAW file
    Set the white balance to the custom profile created above
    Set the color profile created with X-Rite
    Open the color-corrected image in Photoshop (see color setting above)
    Save as JPEG
    Publish
    First, everything seems to go great throughout this entire process, until I see the image on the Web: LINK.  Once published, the image has a very noticible golden-yellow tint to it.  The color-corrected image looks great on both color-calibrated monitors, in RAW and JPEG.  Absolutely perfect.  After noticing the ugly yellow tint in the image I posted to the Web, however, I became aware of a couple more weird things.
    1) When the JPEG was open in Photoshop and I moved the window that contained the image around on my second monitor, the image immediately took on that golden-yellow tint: you can see a screen shot of the color corrected image on my Samsung (bottom) and the yellow version of the same image created when I drag the window around on the Samsung (top) HERE.
    2) When opening the X-Rite software, I got a warning saying that the laptop monitor had been calibrated, but that the Samsung had not.  I got this error even if I calibrated the Samsung monitor right before using X-Rite.  Also, the monitor is definitely calibrated, because the images look great, and the colors match what I see on the laptop.
    3) Recently, I noticed that when waking my computer from sleep, the Samsung monitor no longer holds its Datacolor (Spyder4) calibration.
    I thought the problem I was having might be due to the monitor, for the reasons stated above.  However, I later noticed that when I open the color-corrected JPEG with the default Windows image viewer, it retains the color correction settings.  The image looks fantastic, and doesn't lose it's color profile when I drag the window around.  Also, there seems to be less color loss in the Word documents and PDFs I included this image in: LINK.
    I checked this with several more images, and the results are the exact same.  I scoured the Web as best I could, but my problem seems to be pretty unique.  Does anyone have an idea what might be causing this?
    Thank you!

    Thank you, twenty_one, for taking the time to read my post and put up a reply.  I am going to rebuild my question and post it again here.  But first, to answer some of your points:
    1. A raw file has no color space, until it's opened into one in the raw converter. So this is controlled in ACR, not the camera.
    I just wanted to be as thorough as possible.  One of the steps I took was to set the Color Space setting in my camera to sRGB:
    2. White balance has no bearing whatsoever on camera profiles. A profile is not for white balancing, it's to account for the spectral distribution of the light, which is something else. You make the profile and assign it in ACR, then you white balance for processing. 
    I know.  I wasn't talking about white balance in my camera.  I set the white balance here:
    I grabbed the color for setting the WB here:
    3. If you get a message about monitor calibration upon opening the camera calibration software, something is seriously confused. The two have nothing to do with each other. No relation whatsoever. 
    Camera calibration software?
    4. A corrupted monitor profile will only show up in Photoshop and other color managed software. Other applications that are not color managed will not use the profile and are not affected. So find out which apps are and which aren't before drawing any conclusions.
    Agreed.  That's partly what I am trying to get help with.
    5. Your links don't work, and in any case clicking on links is something most people including myself dislike. It's much better to insert screenshots in the post, by using the camera icon in the reply box.
    I'm new to this forum, so this is helpful to know.  This image shows the color-corrected image (bottom) on my Samsung.  It looks exactly the same in the same window on my laptop monitor.  When I move that window around on my Samsung screen, it turns gold (top).  The image, when posted to the web, looks *similar* to that gold color.
    So let's say I only use Photoshop on my laptop, which is not displaying any colors.  Do you think the golden hue problem will go away?

  • Why does my image get clipped at the right margin?

    Using Pages 5.2 and Preview 7.0 with my iMac running OS 10.9.3, my brochure has an image that gets clipped at the right margin using Pages, but not with Preview (when I print a pdf of the same file). I'm using an HP Deskjet 6980 printer.  Both Pages and Preview are set for borderless 8.5 x 11, in landscape orientation, and the "thumbnail" shown in the printer dialog window is correct for both.  Preview does print the full image but ignores the "fast draft" settings and takes forever to print the page.  Pages is fast, but clips the image by about 7/16" at the right margin (trailing side of the printed page).  I need to print about sixty 2-sided sheets, so can't stand the slowness from Preview.  Any ideas?
    Thanks in advance!

    If you had Pages ’09 v4.3 installed prior to Pages v5+, test if the image clipping issue occurs with the earlier Pages application. Export your current Pages v5+ work as Pages ’09 first, and explicitly open that document with the earlier Pages. Double-clicking will use Pages v5+ if both are installed.

  • Page background images, songs, movies, don't publish

    I'm new to this. I've researched other threads here and cannot find this specifically. I was so proud. What beautiful pages I had created in iWeb and so sad to discover dot mac couldn't display them!
    My tinted page background images have never published. These files published into my hard drive folder but are not on iDisk. Songs appear with a tiny Q for Quicktime and a ? - files were dragged into iWeb from audio media browser. Larger Q with the movies. I have one large Movie 18.5, one smaller - 4.5 MB. It's cool if dot mac can't handle it, but perhaps they shouldn't promote that they can! I'm a huge Mac fan, but any tips or tricks before I attempt to cancel my dot mac purchase? I went back and changed all the background image file names. No luck. I am so hoping that I'm just doing something stupid. I signed up for dot mac to share my music and movie files. Help me make it work!
    G4 Mac OS X (10.4.5) http://web.mac.com/divinelyfem

    Looks OK by me, Bruce

  • Green tint when hooking G4 PowerBook up to LCD projection

    I've been hooking up my G4 to external projection for presentations for a long time and then all of a sudden last week whenever I hooked up to display information to a group the projected image had a green tint. The image always looks fine on my computer but the projected display is really ugly and hard to look at. Any ideas on what the problem is?
    G4 Mac OS X (10.4.5)

    Hi lwb2000;
    First issue: "Green tint" Possible cause - damaged DVI connector in Powerbook, monitor video cable not seated correctly, monitor video cable may be damaged, or monitor connector on video projector may be damaged. Inspect the connectors at all points in the chain.
    Second issue: "display is really ugly and hard to look at" Launch Display Preferences in System Preferences and calibrate (under the 'color' tab) the projector monitor settings.
    Hopefully this will help you.
    Take care.

  • Downloading Raw Images into Aperature

    This topic has to do with getting Raw images into Aperture and not the application it's self.
    There happens to be several ways to download images from a memory card (from the camera to the USB port, from a card reader to the USB port, from a card reader to the Firewire port and from a card adapter to the PCMCIA port).
    The question I have is one of these better than rest for downloading RAW files. Connecting the camera to the computer is the most direct way to do it, but when there are several memory cards to go though it easier to a card reader.
    Photoscene

    I have a firewire reader. It takes less than a minute to pull all the images off a 1 GB card (Lexar 40x or 80x) and into Aperture.
    It's funny that it's so fast, as it's substantially faster to pull the images off the card than it is off of disk. Some serious optimization there. Demos well, I figure

  • Yellow images

    I placed a jpg image into my InDesign document that is supposed to be white snow, but after I place it the images becomes yellow.  In fact, after I choose the image to place and before I click in my document a frame to put it in, it's actually the correct color.  But as soon as I place it, it turns yellow.  When I create a pdf, it's back to white.  But when I try to use the Blurb book creator to upload the book, it's back to yellow.  Why?  If I try to use any other non-Adobe product, like Publisher, it's the correct color.  This same thing happens when I open it in PhotoShop. 
    How do I get rid of the yellow tint on my images?  What should my color settings and profiles be?   I am using Adobe InDesign CS6 for Windows.  My current setup is:
    Settings-Custom
    Working Spaces:
    RGB - sRGB IEC61966-2.1
    CMYK - U.S. Web Coated SWOP v2
    Color Management Polices:
    RGB - Preserve embedded profile
    CMYK - Preserve numbers (ignore linked profile)
    Conversion options:
    Engine - Adobe (ACE)
    Intent - Relative Colormetric
    Use black point compensation-checked
    Thanks for your help,
    Gina

    You can't turn of color management—even with the Emulate ID 2 preset the colors are being managed you just don't know how.
    When you save the istockphoto make sure to include its profile:
    Then in Indesign select the image and double-check that its profile is assigned. With the image selected choose Object>Image Color Settings:

  • How to load javafx applciation faster on web page

    Hello,
    Well i have been using javafx for some weeks. I see it is not enough fast for it's loading on a browser. Because just imagine i have a small application on javafx just like the project manager which i put on my webpage. The rest of the content of the webpage loads really quickly but just the project manager loads too slow....I mean there must be some consistency in it's loading with the other content. I really want to know if there can be a piece of code that load the application really quickly??? The difference in the loading of the content of the page and the javafx application should not be shown. The <update check="background"/>... doesnot load it fast.
    Please help

    The update check is, if I understood it correctly, to check if there is an update of the JavaFX runtime. Or perhaps (also?) of the application's jar, with regard to the user's cache.
    The very first time the users load the applet, they have to get the JavaFX runtimes, which is time-consuming, as they are quite large (compared to size of typical applet). Although if you make a game, the applet blows fast as they include assets like images and sounds (Flash applets can load slowly too, because of that).
    Next, the load time will be greatly reduced because the jars will be found in the cache. Unless the users clear it...
    Another latency factor is just the load time of the JVM itself, and of its libraries.
    Currently, I doubt there will be much ways to reduce this time (having a fast server can help...).
    I believe Sun is well aware of this issue and is actively working on it.
    For example, see latest release of Java (1.6.0_18), which curiously is available in [Java SE Downloads|http://java.sun.com/javase/downloads/index.jsp] but not in [Free Java Download|http://www.java.com/en/download/index.jsp] page (where we come from sun.com/java) nor in the automatic updates.
    It [introduces a number of speed improvements|http://java.sun.com/javase/6/webnotes/6u18.html], among them:
    - Better startup of applications and applets on systems where D3D is used.
    - Revised support for pre-verification of FX runtime. Improves warm start of typical FX applications by up to 15 percent. +(not dramatical but that's a step forward)+
    - Concurrent download of jars for webstart applications and applets.
    - Number of other startup improvements for UI applications and applets.
    Some other (unrelated to our issue here) improvements are interesting for JavaFX:
    - Improved performance of applications using translucent windows.
    - Better performance and smaller memory consumption by text rasterizer.
    - Faster processing of PNG images.
    It also adds a number of JWS improvements.
    The concurrent download of jars might be particularly critical for performance improvements of applets using lot of libraries.

Maybe you are looking for

  • Akai MPD 16 or other sample controlling devices with Logic?

    I am aware that this topic has been discussed before in the forum, however the answer i was looking for was not presented too clearly. I am using an Akai MPD 16 with Logic Express 7. I am looking to assign samples to a sampler (most likely .wav drums

  • How can I reverse a photo image where newsprint is backward?

    how can I reverse a photo image where newsprint is backward?

  • Adobe Photoshop CS5 - Repousee'

    Im finding problems in using this tool. My graphic card is a GeForce 9500, Which has key features like Full Microsoft DirectX 10 Shader model 4.0 support, OpenGL 2.1 Support. When using the Repousee tool, the quality of the text which i have used it

  • Field Exits in ECC5.0

    Hi,                                                                    In the new system ECC 5.0, the Field Exits implemented in the older system customer are discontinued. Does any one know if there is a migration strategy for the Field Exits? Or ho

  • Workflow absence in ESS ?

    hi there, we have started with a copy (and lightly modified) of WF WS12300111. (absences in ESS). well, with this workflow the boss of an employee gets an email that the emp. has entered a absence request (Holiday, and so on.........) and that it has