What's most efficient for drawing a semi-transparent overlay?

I have a large .TIF loaded as a RenderedImage through JAI and drawn with Graphics2D.drawRenderedImage(). It can be scaled by the user and it uses the JAI operator "Scale" to do it and is extremely fast given the size if the TIF (2528x3297).
The problem comes when I need to take another image and use it as an "overlay". Only the red part of this image needs to actually be drawn, and that needs to have some transparency. The rest of the image should be completely transparent. I'm looking for a fast and efficient way of approaching both the drawing and scaling. Any type of image (supported by AWT/JAI at least) is acceptable, passing it through a filter at runtime to make the parts transparent or semi-transparent is fine too. I'm just looknig for a good methodology that will offer speed in both drawing and scaling in conjunction with the TIF mentioned earlier.
I tried using a PNG that already had the desired transparency but it behaves oddly. If I load it as an Image using ImageIO.read() and then use drawImage() and getScaledInstanceOf() it draws relatively slowly, but just barely acceptable, but takes way too long to scale. If I load it as a RenderedImage with JAI and use drawRenderedImage() the painting is extremely fast when it's first loaded with no scaling and when i scale it it's fairly fast at scaling, but after it's been scaled it draws extremely slowly.
I tried using a GIF but had pretty much the exact same issues as PNG. Slow scaling and decent drawing as an Image and quick scaling and drawing initially, but extremely slow drawing after it's been scaled.
Strangely enough one of the best middle grounds I've seen in my experimentations was a .TIF I loaded in JAI, converted to BufferedImage, passed through a filter to make all white transparent and all black be red, and then drew as a BufferedImage.
I'm totally lost and confused here. Could someone please help me out with some advice?

Ah, that's the kind of confirmation I was hoping for, thanks! Though if anyone has anything else to weigh in (specific considerations and the like) then feel free!

Similar Messages

  • Appleworks does not work with mountain Lion.  What can I use for drawing and painting?

    Appleworks does not work with mountain Lion.  What can I use for drawing and painting?
    MacBook
    Marian

    Please see this article which examines various possible alternatives to AppleWorks:
    http://rfwilmut.net/aw

  • Semi-Transparent Overlay's on Text, Tables, Pictures

    Hi, I'm new to Keynote. I wanted to create a table in which certain portions of the table are more visible than others. How can I do this? I was thinking about some sort of semi-transparent overlay.
    Here's an example:
    Also, how can I do this for text in Keynote such that my current text sentence is visually set apart from previous text on a slide.
    Here's an example:

    The first issue can be handled by setting the colour of the text and borders to a colour that you have made semi-opaque. Select the cells you want to change, then in the Text Inspector, click on the text colour to bring up the Colours Palette. Choose the colour, and then at the bottom of the palette use the opacity slider to change the opacity of the text to what you want. You can now drag that colour from the area at the top of the palette to one of the "swatch" squares at the bottom, so you can easily re-use it. Now go to the Graphic Palette, click on the stroke colour to bring up the Colour Palette again, and just click on the newly created swatch to set the lines to the same colour.
    For the effect with the bullet points, you can either do a similar thing with the colour, or you can try using a Build In using the Delivery methods of "By Highlighted Bullet".

  • Fading a scene, what's most efficient?

    I'm developing an engine that creates a scene using a load of symbols and manipulates them. What I'm wondering is; is it more efficient to fade a scene by increasing the alpha of each symbol, as my background is black anyway (the colour I want to fade-to). Or is it better to fade using an extra layer on top which becomes more opaque?
    While the fade is occuring, the engine will be paused, so it won't be moving objects etc. as normal.
    Also, is it more efficient to do one at certain times? For example; if I have five symbols will symbol fading be better than a fade-layer, while 20 symbols would be less efficient?
    Just trying to get an idea for this now while I develop the meat of the engine, the fancy fading between scenes (rather than the current "snapping") can come later =)

    Ah, that's the kind of confirmation I was hoping for, thanks! Though if anyone has anything else to weigh in (specific considerations and the like) then feel free!

  • Photo Management, what is most efficient and practical?

    I'm somewhat new to Macs. I have simply been downloading my digital photos directly to iPhoto, however, once in there, they are hard to manage, duplicate files are created. When you move photos, they need to be re-imported. Can someone tell me how they manage their photos, do you use iPhoto or simply import photos you want to edit or manipulate to iPhoto, etc....

    Hi,
    I'd get GraphicConverter gives way more options...
    http://www.macupdate.com/info.php/id/263
    The Browse folder is great, and so much more you can do with it.
    I dislike everything about iPhoto myself.

  • What software is for drawing animation?

    does anyone know what software is used for drawing animation?.I tried adobe flash cs3 which was siad to be
    the animation software used for eddsworld a youtube hit.I want to make something like eddsworld but adobe flash cs3 wont come up when I search it on this website.If you have an answer to my question please reply!.
        from the epiccrew............................

    Flash Creative Suite 6 is the current version.  You can find more details at http://www.adobe.com/products/flash.html.

  • What's most effecient way to load dvd op sys to G-4 with only cd capab ?

    Have 2 Macs. Recently upgraded newer one to Tiger (full version). Would like to use my original 10.2.7 OS to load on my older machine but it only has CD capabilities. What's most efficient way to do this? (I'm assuming it's legal to do so since I bought a new version for my new machine).
    PowerMac3,6   Mac OS X (10.4.5)  

    Hi Bill, and welcome to the discussions.
    Since you purchased a version of Tiger for the newer Mac, what you want to do would not violate the spirit of the licensing agreement (one install per copy of the software).
    That said, what you want to do will likely violate the technical limitations of your original 10.2.7 installation DVD. Grey installation DVDs shipped with specific hardware only contain the drivers for that specific hardware. In other words, if the newer Mac is G4 MDD tower with FireWire 800 and a dual 1GHz processor, that's what the DVD will be expecting when it tries to install the system software. If your older machine is a G3 iMac, the DVD won't recognize the processor, CD drive, CRT monitor, or anything else on the logic board. It simply doesn't have the drivers required to support the different hardware.
    If the older Mac has FireWire, you can install your original 10.2.7 on it, but there's no guarantee it'll work. Here's how:
    1. Boot the old mac into Target Disk Mode (hold the T key while booting; when done, you'll get an orange FireWire icon bouncing around on a blue screen);
    2. Connect the computers using FireWire cable, and the old mac should mount as an external hard drive;
    3. Reoot the new mac from the 10.2.7 install DVD;
    4. When it comes time to select the destination for the install, select the old Mac;
    5. When finished, turn off both computers, and disconnect the FireWire cable;
    6. Restart the old mac, and if you're really luck, and the hardware on the two macs isn't too different, it'll boot to 10.2.7;
    7. Download the 10.2.8 Combo Update and install.
    Just remember: the greater the difference in hardware specifications between the two macs, the greater the likelihood that this will not work.
    Good luck!
    Andrew

  • Most efficient/quickest way to set NTFS permissions in PowerShell

    Hello all,
    Trying to figure out what the most efficient/quickest way to set NTFS permissions via PowerShell is. I am currently using ICACLS but it is taking FOREVER as I can't figure out how to make inheritance work with this command.
    This has prompted me to begin looking at other options for setting NTFS permissions in PowerShell, and I wondered what everyone here likes to use for this task in PowerShell?

    Ah ok. Unfortunately, my ICACLS is taking FOREVER. Here is the code I'm using:
    ICACLS "C:\users\[user]\Desktop\test" /grant:r ("[user]" + ':r') /T /C /Q
    However:
    1.  I can't figure out how to make the inheritance parameter work with ICACLS
    2. If I do make the inheritance parameter work with ICACLS, I still need a way to add the permission to child objects that aren't inheriting.
    Any tips on how to improve performance of ICACLS?
    1. icacls folder /grant GROUPNAME:(OI)(CI)(F)  (i will post corrected code later, this works in CMD but not powershell couse of bracers)
    2.  get-childitem -recurse -force |?{$_.psiscontainer} |%{icacls ....}  (or u can list only folders where inheritance is disabled and apply icacls just on them)
    I think jrv and Mekac answered the first question about inheritance flags. I would just add that you probably don't want to use the /T switch with icacls.exe because that appears to set an explicit entry on all child items (that's probably why it's taking
    so long).
    For your second question, I'd suggest using the Get-Acl cmdlet. It throws terminating errors, so I usually wrap it in a try/catch block. Something like this might work if you just wanted the paths to files/folders that aren't inheriting permissions:
    dir $Path -Recurse | ForEach-Object {
    try {
    Get-Acl $_.FullName | where { $_.AreAccessRulesProtected } | ForEach-Object { Convert-Path $_.Path }
    catch {
    Write-Error ("Get-Acl error: {0}" -f $_.Exception.Message)
    return
    If you're looking for speed/performance, you don't want to just use the PowerShell Access Control (PAC) module that Mike linked to above by itself. It's implemented entirely in PowerShell, so it's incredibly slow right now (unless you use it along with Get-Acl
    / see below for an example). I'm slowly working on creating a compiled version that is much faster, and I think I'm pretty close to having something that I can put in the gallery.
    Since I wasn't sure which command would give you the best results, I used Measure-Command to test a few different ones. Each of the following four commands should do the exact same thing. Here are my results (note that I just ran the commands a few times
    and averaged the results on a test system; this wasn't very rigorous testing):
    # Make sure that this folder and user/group exist:
    $Path = "D:\TestFolder"
    $Principal = "TestUser"
    # Native PowerShell/.NET -- Took about 15 ms
    $Acl = Get-Acl $Path
    $Acl.AddAccessRule((New-Object System.Security.AccessControl.FileSystemAccessRule(
    $Principal,
    "Read", # [System.Security.AccessControl.FileSystemRights]
    "ContainerInherit, ObjectInherit", # [System.Security.AccessControl.InheritanceFlags]
    "None", # [System.Security.AccessControl.PropagationFlags]
    "Allow" # [System.Security.AccessControl.AccessControlType]
    (Get-Item $Path).SetAccessControl($Acl)
    # PAC Module 3.0 w/ PowerShell/.NET commands -- Took about 35 ms
    $Acl = Get-Acl $Path | Add-AccessControlEntry -Principal $Principal -FolderRights Read -PassThru
    (Get-Item $Path).SetAccessControl($Acl)
    # icacls.exe -- Took about 40ms
    icacls.exe $Path /grant "${Principal}:(OI)(CI)(R)"
    # PAC Module 3.0 w/o Get-Acl -- Took about 350 ms
    Add-AccessControlEntry -Path $Path -Principal $Principal -FolderRights Read -Force
    Unless I messed something up, it looks like the native PowerShell/.NET commands are faster than icacls.exe, at least for modifying a single folder's DACL.

  • Using a fake semi-transparency - what's really possible?

    Hi,
      I'm just now moving into DW CS4 (from cs3) and I'm on an intel iMac. I'm trying to make a table background that is semi-transparent while KEEPING text and photos 100% opaque. I'm already familiar with this kind of code: (just improvising here):
    .tableMain {
    background: transparent;
    filter=alpha(opacity=50);
    opacity=.5
    But this makes EVERYTHING semi-transparent - content and all. I'd love to know if it is possible to keep the content fully in view.
    I've tried making a semi-transparent GIF or PNG background in Photoshop CS4 and using it for the table background, but that doesn't seem to work.
    I did discover this (perhaps unique to my site) solution for a fake semi-transparency: Since I've got a gradient background on my site (see www.frankbright.com/History.htm ), I took a 'Screen Snapshot' of the background, from the bottom of the navigation to as far down as I could go. Then I used PS CS4 to expand the canvas and color down to cover my long pages. (See Jazz Links)
    Then I used PS levels to darken the snapshot very slightly, so as to intimate a gray semi-transparent effect. Then I simply used that snapshot as the table background.
    This looks better on the long, clearer pages that have only text content. With the index3 home page, however,  you don't sense the semi-transparent effect I'm going for as much.
    I've also noticed the 'Extensions' area of the CSS interface in DW - does this have anything to do with what I'm trying to do?
    Anyways, I'm open to ideas, if anyone could suggest any.
    Many Thanks, Frank B.

    Hi
    You did not say what the problem was.
    others viewing this thread. please read -
    As for the colors of the background gradient using IEFilters, (for those who did not know on the forum, the IEFilter for background gradient was available since IE4.5, circa 1996, and all filters since IE5, circa 1998) you will need to adjust these as required. Luckily enough most background gradients go from one color to white or a lighter color of the starting color.
    For FF and Safari see - http://hacks.mozilla.org/2009/11/css-gradients-firefox-36/, http://webkit.org/blog/175/introducing-css-gradients/.
    Google Chrome uses the webkit declaration, but unfortunately Opera does not support the feature, (use a standard background color at the beginning of the declaration) and FF only from version 3.6. But with the upgrading for FF users normally being 70+% within 6 months, this does mean that 85% of users will support the background gradient.
    PZ
    Edit: If you are using a css reset then it may be worth placing the position: relative; statement in this, as these normally include all the elements from H1 to pre.
    Message was edited by: pziecina

  • Help with efficiency for insert/get methods?

    I am not an expert when it comes to run times and I am wondering what the most efficient data structures would be for a program I am making. I need to:
    Go through a large document in which each line is formatted as: (String Integer), and add the string & integer to some sort of data structure. The list of string/integers is large and I need to be able to access the information in the data structure efficiently. Right now I am using a scanner to read the doc and a TreeMap<String, Integer> to store the info. The get method for the TreeMap is fine, but processing the document is a little slow.
    What do you think? TreeMap, hashing, balanced search tree? Remember, the insert and get methods are the two that need to be most efficient.

    Why are you using a TreeMap? Is the order of iteration important to you?
    If not, then you can probably get better performance using a HashMap, properly configured. The TreeMap has O(n) performance for get/put. while HashMap has constant-time performance. If you properly configure the initialCapacity and loadFactor for the HashMap you can get very efficient puts by reducing the number of re-hashes that are needed during map-growth. Note that if you retrieve the data from the Map using an iterator (rather than just calling get()) then you have to be more careful with these settings because they affect the total number of buckets - which can affect the speed of iteration.
    You should also run your code through a profiler. Are you sure that the put() operation is the slow step when reading from the file? It may be that your file access is really the slow step, and so modifying the data structure would have little or no effect. You might consider different methods for accessing the file data, perhaps something from thew NIO package would help speed things up (I am not particularly sure though - I am not very familiar with NIO).

  • Stage3D semi transparent textures

    I have been playing arounf with the Stage3D with moderate success but i have an issue rendering transparent textures.
    as you can see some of the faces at the back are only partially rendered.
    E.g. the bottom face is rendered through the front face but not through the side face)
    Does anyone have any idea what might be causing this sort of behaviour?
    you can see the demo here. (www.spoboyle.co.uk/demo/) click to pause the rotation
    I have also included a screen shot

    I have a solution now for the cube problem (or any convex polygon)
    cull the front faces draw the polygon and then cull the back faces and draw again.
    so generally when dealing with semi-transparent objects
    first draw all opaque objects
    then draw all semi-transparent objects in order starting with those furthest away from the camera (convex objects should be drawn twice as mentioned above)
    if you have any concave polygons all I can say is good luck!
    I have removed all the above links and placed all the files here.

  • What is the best, most efficient way to read a .xls File and create a pipe-delimited .csv File?

    What is the best and most efficient way to read a .xls File and create a pipe-delimited .csv File?
    Thanks in advance for your review and am hopeful for a reply.
    ITBobbyP85

    You should have no trouble doing this in SSIS. Simply add a data flow with connection managers to an existing .xls file (excel connection manager) and a new .csv file (flat file). Add a source to the xls and destination to the csv, and set the destination
    csv parameter "delay validation" to true. Use an expression to define the name of the new .csv file.
    In the flat file connection manager, set the column delimiter to the pipe character.

  • Upgrading Unity 4.0.5 to version 8 and replacing the server. Need advice for most efficient upgrade path.

    Hello,
    I need to upgrade Unity 4.0.5 without failover to Unity 8, and we are replacing the server as well.
    What would be the most efficient upgrade path for this?
    Thanks!!

    Brian,
    The most efficient path is to use COBRAS.  I have a number of posts explaining the overall process.  At the highest-level, this allows you to build out the new Unity 8x environment, get it integrated with AD/Exchange, and then build out configurations that don't migrate over (there are a few which are highlighted in the COBRAS help).  From there, you migrate data over from the 4x system.  There may or may not be a few steps along the way but they are outlined in numerous posts I've contributed to regarding COBRAS and also in the COBRAS Help which is located at www.ciscounitytools.com.
    Hailey
    Please rate helpful posts!

  • What is the best stylus to use for drawing on my ipad?

    For drawing apps, what is the best stylus for my ipad?  What does qualities does one need in a stylus?

    There are many stylii for iPad.
    The main requirement is that it be a capacitive type of stylus. Meaning that the stylus' has to be able to conduct the electrical impulses from your fingers to the tip of the pen so that the pen functions just like if you're touching it with your finger.
    Stylii made for iPhone/iPod Touch or iPad will usually be indicated.
    You really need to do a search on the web for them, and, if possible, find a retailer that is close to your location to see one, in person, to see if it might fit your needs.
    Here are few links to get you started
    http://myipadgames.com/best-ipad-stylus/
    http://graphicssoft.about.com/od/iphoneandipodtouchapps/ss/Best-Stylus.htm
    The last link has links for other stylii at the bottom of page that you can tap or click on.
    Personally, I have two that I use and like. I use a Pogo Sketch stylus, and just recently switched to using a Wacom Bamboo stylus that I find is really good for drawing. I has a smaller rubber tip on the end than most other stylii.
    You have to find one you think might work for you based upon size, length/diameter, and size of the pen tip.
    And if you can get to see some of these in person, the stylus' weight. I find, for me, the lighter a stylus is the better.
    Good luck and Happy Hunting!

  • IFRAME into iMOVIE - most efficient method for importing?

    What would be the most efficient method for importing iFrame movies from a camera into iMovie?
    iFrame i suppose to save time and work more efficiently in lue of quality but I don't seem to find I way to import the movies faster than in other formats.
    On a second note, inporting in iMovie from DV (tape) cameras dramaticly reduced the image quality. Do we still have the same issue when importing an iFrame movie?
    Thank you for your help!

    Im completly new myself to importing IFRAME into Imovie 11 as i only got my new Panasonic X920 Camcorder 2 days ago.Can you please tell me is there a big drop in quality from 1080 60p to IFRAME Quality.

Maybe you are looking for

  • Computer wont see iPhone 3G...

    Now I updated my phone and I got it to sync ONCE, now it doesnt want to even charge on the computer. I have Windows 7 X64 and the updated iTune. The computer makes the noise that it sees a new device, but the iPhone just wont sync. HELP!

  • Need some help in outbound IDOC  !

    Hi friends i have written an outbound IDOC generation code Where i am able to create idocs. When I am viewing them in WE02....I can see the yellow sign. IF i process them through WE14....IT IS BEING CONVERTED TO GREEN. Can I call that  screen with in

  • BADI BBP_CATALOG_TRANSFER

    Hello! We are working with SRM 5.0 and we are using punch out. We need to buy on stock (cost assignment category ST) out of those external catalogs. But the vendor cannot put our SAP material numbers into his system. How can I do the mapping between

  • AQM 8.5.2 installs, but won't work

    Customer has an installation of AQM 8.5.2 for UCCX that we have installed....twice.  We can succesfully get through the entire setup, it validates everything, etc.  But after that the fun begins. If you try and come back and modify the settings, it r

  • Won't recognize cd

    My Mac used to burn cd's fine but since I upgraded my iphone, my MAC will no longer read ANY cd's or burn them.