Is it possible to optimize this Bilinear Image Resizing Method more?

I'm trying to write a speedy bilinear image resizer, for displaying images so it doesn't need to me 100% accurate, just look correct.
So far i've come up with
     public static final Image resampleImage(Image orgImage, int newWidth, int newHeight) {
          int orgWidth = orgImage.getWidth();
          int orgHeight = orgImage.getHeight();
          int orgLength = orgWidth * orgHeight;
          int orgMax = orgLength - 1;
          int[] rawInput = new int[orgLength];
          orgImage.getRGB(rawInput, 0, orgWidth, 0, 0, orgWidth, orgHeight);
          int newLength = newWidth * newHeight;
          int[] rawOutput = new int[newLength];
          int yd = (orgHeight / newHeight - 1) * orgWidth;
          int yr = orgHeight % newHeight;
          int xd = orgWidth / newWidth;
          int xr = orgWidth % newWidth;
          int outOffset = 0;
          int inOffset = 0;
          // Whole pile of non array variables for the loop.
          int pixelA, pixelB, pixelC, pixelD;
          int xo, yo;
          int weightA, weightB, weightC, weightD;
          int redA, redB, redC, redD;
          int greenA, greenB, greenC, greenD;
          int blueA, blueB, blueC, blueD;
          int red, green, blue;
          for (int y = newHeight, ye = 0; y > 0; y--) {
               for (int x = newWidth, xe = 0; x > 0; x--) {
                    // Set source pixels.
                    pixelA = inOffset;
                    pixelB = pixelA + 1;
                    pixelC = pixelA + orgWidth;
                    pixelD = pixelC + 1;
                    // Get pixel values from array for speed, avoiding overflow.
                    pixelA = rawInput[pixelA];
                    pixelB = pixelB > orgMax ? pixelA : rawInput[pixelB];
                    pixelC = pixelC > orgMax ? pixelA : rawInput[pixelC];
                    pixelD = pixelD > orgMax ? pixelB : rawInput[pixelD];
                    // Calculate pixel weights from error values xe & ye.
                    xo = (xe << 8) / newWidth;
                    yo = (ye << 8) / newHeight;
                    weightD = xo * yo;
                    weightC = (yo << 8) - weightD;
                    weightB = (xo << 8) - weightD;
                    weightA = 0x10000 - weightB - weightC - weightD;
                    // Isolate colour channels.
                    redA = pixelA >> 16;
                    redB = pixelB >> 16;
                    redC = pixelC >> 16;
                    redD = pixelD >> 16;
                    greenA = pixelA & 0x00FF00;
                    greenB = pixelB & 0x00FF00;
                    greenC = pixelC & 0x00FF00;
                    greenD = pixelD & 0x00FF00;
                    blueA = pixelA & 0x0000FF;
                    blueB = pixelB & 0x0000FF;
                    blueC = pixelC & 0x0000FF;
                    blueD = pixelD & 0x0000FF;
                    // Calculate new pixels colour and mask.
                    red = 0x00FF0000 & (redA * weightA + redB * weightB + redC * weightC + redD * weightD);
                    green = 0xFF000000 & (greenA * weightA + greenB * weightB + greenC * weightC + greenD * weightD);
                    blue = 0x00FF0000 & (blueA * weightA + blueB * weightB + blueC * weightC + blueD * weightD);
                    // Store pixel in output buffer and increment offset.
                    rawOutput[outOffset++] = red + (((green | blue) >> 16));
                    // Increment input by x delta.
                    inOffset += xd;
                    // Correct if we have a roll over error.
                    xe += xr;
                    if (xe >= newWidth) {
                         xe -= newWidth;
                         inOffset++;
               // Increment input by y delta.
               inOffset += yd;
               // Correct if we have a roll over error.
               ye += yr;
               if (ye >= newHeight) {
                    ye -= newHeight;
                    inOffset += orgWidth;
          return Image.createRGBImage(rawOutput, newWidth, newHeight, false);
     }I was wondering if anyone can see any problems with this, or suggest any faster ways of doing this.
Thanks
Edited by: chris.beswick on Nov 5, 2008 3:24 AM
Edited by: chris.beswick on Nov 5, 2008 3:40 AM - Changed title to reflect what I am after.

Thanks for the reply.
Sadly, both the methods in the link are for simple nearest neighbour resizing, which looks god awefull. In addition the first one on the page is insanely slow only only needed with much versions of J2ME that do not support directly accessing pixel data from Image (via getRGB()).
I started with something like the second example, and have them tweaked it down while adding in the weighted re sampling of the 4 nearest pixels, to remove jaggies. I've managed to get my "bilinear" version to be only around 4 times slower than nearest neighbour, which given that it reads 4 times the data for each pixel is not bad... just wondering if I can go any faster :D
My current intention is it use a fast nearest neighbour while the image is being moved around / zoomed, and then when there is a pause in user input update the image with the bilinear image.
Also, I'm trying to use variables (xA, xB, xC, xD) in place of arrays(x[0], x[1]. x[2]. x[3]) as I've read somewhere it is faster as there is no need for bounds checks when accessing a variable unlike an array,
Finally, does anyone have any good ideas on using bit shifting to approximate all the multiplication (ie x << 8 instead of x * 256) of the pixels by weights, the resulting answer may be "wrong" but if it is close enough it might work.
Chris
Edited by: chris.beswick on Nov 5, 2008 4:14 AM

Similar Messages

  • I wish to export several still images from iMovie as JPEG or TIFF. Is it possible to do this using iMovie, if so how? Any advice is greatly appreciated. I've already managed to add a freeze frame to extract the desired frame but I can't export it. Thanks.

    I wish to export several frames from iMovie as if they were images (like JPEGs or TIFFs). Is it possible to do this using iMovie, if so how? Any advice is greatly appreciated. I've already managed to 'add a freeze frame' to isolate the desired frames but I can't export it. Thanks.

    Ach... I found a solution thanks to previous posts which came to light after I'd posted what was obviously a question that had been asked before.

  • I have a mac mini and just purchased a moshi hdmi connector for my LED TV. The problem is, I wanted to be able to take my mouse from one screen to another, not just as a mirror image! Is it possible to do this some how?

    I have a mac mini and just purchased a moshi hdmi connector for my LED TV. The problem is, I wanted to be able to take my mouse from one screen to another, not just as a mirror image! Is it possible to do this some how?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    If you have two displays attached, then the function to change from mirrored to extended Desktop will appear in System Prefs/Displays.

  • Possible to export keywords for images in a catalog?

    I have a fairly large catalog with scanned images (several thousands of images). The images have a number of keywords each and many have descriptions and titles. From this, I would like to create some sort of web site where this information is preserved. The web that I'm envisioning should list all the keywords that occurs in the catalog, and if you click on a keyword it should show all images tagged with the keyword.
    However, with Lightroom 1.2 it doesn't seem to be possible to have the keywords included in the web gallery. Or am I wrong? Is it possible somehow?
    My next way of attacking this problem was to use the xmp sidecar files. Since the keywords are stored in the sidecar xmp file, I thought that I would be able to retrieve the keywords from the xmp-file with the help of some scripts and XSLT. Yes, a little extra work involved of course, but still doable. Unfortunately, since I've got TIFF files and not RAW files, the xmp data is embedded in the TIFF file and not written in the sidecar xmp file. Is it possible to have the xmp data written to the sidecar file also for TIFF images?
    Yes, it should be possible to extract the xmp data from the TIFF files, merge all this data into a big xml file and then process that with an XSLT script, but I would rather avoid poking inside the TIFF file, if at all possible.
    If I can just get some sort of mapping between all images and the keywords, preferably in an xml format (html or plain text would also do) I should be able to build the web myself.
    Any advice on how I can achieve this?

    yes it is possible to do this, but it is a bit complicated. Under the share menu choose export media. In the dialog that appears you can choose audio only. There are options for AAC, AIFF etc. The problem is that it will export all of the audio from your project so if you want only audio from a particular clip to be exported you need to create a new project and then copy/paste the clip into the new project. You can then export that audio as described above. An alternative is to create a new empty compound clip in the browser and open it in a timeline and copy/paste your clip into it. You can then export audio only as above. Once you have edited the audio, import it into FCPX and add as attached clip to the original clip. You can either drag the volume of the original audio down so it is not audible or detach the original audio and delete it. Not as simple as in previous versions of FCP but do-able.

  • Is it possible to add a barcode image generator API on HTMLDB that support

    Hi All,
    Currently we create Barcodes images using a Java solution - open source API called Barbeque.barcode.servlet. Is it possible to add a barcode image generator API on HTMLDB that support multiple formats?
    Our current process:
    All jobs created in our system require a barcode which is then printed onto a cover sheet for each job (refer example). We also currently have individual barcodes printed on a single feed barcode printer for attaching to jobs sheets. We also print A4 sheets of barcodes with the Field Technican id number on that we sent out to them.
    Thanks in advacne
    Manoj

    It certainly is possible to call Java from PL/SQL and so therefore from APEX.
    The process is fairly well documented online and there's a well cited example of calling Apache FOP within these forums.
    You may however need to do a little work to wrap your Java library using static methods in order to do this.
    Regards
    Ben

  • I seem to have disabled an ipad - is it possible to reverse this

    I seem to have disabled my ipad - is it possible to reverse this?

    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school enviroment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • I want to add image in column is it possible then how to add image in data base what data type we need to do

    I want to add image in column is it possible then how to add image in data base  what data type we need to give we required any casting  please show me one example
    jitendra

    Hi again,
    Several points that can help more:
    1. If you are working with Dot.Net, then I highly recommend read the first link that you got! This is nice and simple coding. Another option is this link which is even better in my opinion:
    http://www.dotnetgallery.com/kb/resource21-How-to-store-and-retrieve-images-from-SQL-server-database-using-aspnet.aspx
    2. As i mention above both link use the column's type image. There are several other option of working with Files. In most of my applications architecture I find that it is better to use a column which let us use any type of file and not an image column.
    In choosing the right column's type for your needs basically your fist question should be if if you want to store your data inside relational database environment or outside relational environment. It is a good idea to look for blogs on this issue. Next
    if you chose to store your data inside then you need to chose the right column type according to your server version. I highly recommend to look for blogs on the differences between those column's types: IMAGE, 
    Check those links:
    To BLOB or Not To BLOB: Large Object Storage in a Database or a Filesystem
    http://research.microsoft.com/apps/pubs/default.aspx?id=64525
    FILESTREAM feature of SQL Server 2008
    http://msdn.microsoft.com/library/hh461480
    FileTables feature of SQL Server 2012
    http://technet.microsoft.com/en-us/library/ff929144.aspx
    Compare Options for Storing Blobs (SQL Server)
    http://technet.microsoft.com/en-us/library/hh403405.aspx
    Binary Large Object (Blob) Data (SQL Server)
    http://technet.microsoft.com/en-us/library/bb895234.aspx
    Managing BLOBs using SQL Server FileStream via EF and WCF streaming
    * Very nice tutorial!
    http://petermeinl.wordpress.com/2012/02/20/managing-blobs-using-sql-server-filestream-via-ef-and-wcf-streaming/
    [Personal Site] [Blog] [Facebook]

  • Is it possible to optimize a customized report painter?

    Hi Experts,
    Is it possible to optimize a report painter? How?
    It's too risky too edit the codes since all of the programs are SAP Standard programs. I already added indices in to the customized tables. But still it takes me 12 minutes to excute this report painter.
    I tried to debug the codes there are several and nested perform routines inside the loop.Have you tried modifying a report painter program?
    Thanks. Points will be given...

    Hi,
    You can modify Standard report painter programs, but ideally SAP doesnt recommend it.
    SAP has provided Notes for any add-on functionality or to fix bugs.
    Please search for a sap note on www.service.sap.com
    Best regards,
    Prashant

  • Is it possible to optimize a report painter?

    Hi Experts,
    Is it possible to optimize a report painter? How?
    It's too risky too edit the codes since all of the programs are SAP Standard programs. I already added indices in to the customized tables. But still it takes me 12 minutes to excute this report painter.
    I tried to debug the codes there are several and nested perform routines inside the loop.Have you tried modifying a report painter program?
    Thanks. Points will be given...

    hi,
    Check this -
    For Report Painter
    http://help.sap.com/saphelp_47x200/helpdata/en/66/bc7d2543c211d182b30000e829fbfe/content.htm
    http://searchsap.techtarget.com/searchSAP/downloads/Teach_yourself_SAP_C20.pdf#search=%22CREATE%20REPORT%20USING%20SQVI%20%2C%20SAP%22
    Re: Interactive ALV
    With Regards
    Madhu

  • Is it possible share the geotags of images in a shared photostream?

    When sharing an image in a shared photostream the geotag seems to be removed. Is it possible to change this behaviour to share the locations of images?

    iPhoto --> Preferences --> Advanced --> Include location information for published photos.

  • Is it possible to save a picture/image file that is within an iOS app?

    Is it possible to save a picture/image file that is within an app?
    The image in question cannot be shrunk, so using the iPhone built-in Screenshot function (by pressing both "Home" & "On/OffSleep/Wake" buttons simultaneously) only produces part of the image.
    Thanks.

    Generally in all Apple iOS apps, you can hold down on the image and the save image dialogue will pop up. Many third party developers adopt this method, but some also have other weird ways of doing it through menus. What appa re you trying to do this with?

  • Is it possible to make a background image in css link?

    I'm building tiles of services and its all done in CSS calling for the background from image files. There's text which I know I can link but I want the whole tile to be a link and just have a border appear when people mouse over it (know how to do that) but I don't know how to code the tile as a whole as a link.
    Help?

    Line 67, Column 145:         document type does not allow element "div"  here; missing one of "object", "applet", "map", "iframe", "button",  "ins", "del" start-tag
    …content" class="serviceBoxcontentBody"><span style="float: left; width: 219px;…

    The mentioned element is not allowed to appear in the context in  which       you've placed it; the other mentioned elements are the only ones  that       are both allowed there and can contain the element  mentioned.       This might mean that you need a containing element, or possibly  that       you've forgotten to close a previous element.
    One possible cause for this message is that you have attempted to  put a       block-level element (such as "<p>" or "<table>")  inside an       inline element (such as "<a>", "<span>", or  "<font>").
    But it works.   Ok, what it the proper way to do this, please. Everything else validates fine.   

  • How is it possible to adjust the background images and the text in Mail?

    How is it possible to adjust the background images and the text in Mail?

    Here's the solution I used to solve the same problem. If you're not comfortable editing the source files, this might be more than you want to take on--but I've done it to several files with no ill effects. You can follow the instructions on this page and the referenced original post from (he includes a link on the page). Good luck! He's got some great tips on some of his other pages.
    http://photo.rwboyer.com/2010/03/15/aperture-3-book-theme-trick/
    A warning about editing the Master pages--it only edits them in that book--it doesn't update the theme. So if you go to create another book with those same layouts, you'll have to duplicate the book and replace all the images. An alternative would be to create a "clean" book with no photos in it and then just use that as a starting point each time.

  • Optimize this

    Hi,
    how can we optimize this code?
      SELECT mara~matnr  "Material NO
             matkl  "Material group
             wrkst  "Basic Material
             prdha  "Product hierarchy
             marc~werks   "Plant
             fevor   "Production Scheduler
             dismm   "MRP Type
             dispo   "MRP Controller
             plifz   "planned delivery time in days
             ekgrp   "Purchasing Group
             beskz   "Procurement Type
             prctr   "Profit Center
             FROM mara INNER JOIN marc
             ON mara~matnr = marc~matnr
             INTO TABLE itab_marc
             WHERE mara~matnr IN s_matnr
             AND werks IN s_plant
             AND fevor IN s_schdlr
             AND dispo IN s_mrp
             AND ekgrp IN s_purgrp
             AND beskz IN s_prtype
             AND prdha IN s_proj.
      IF sy-subrc EQ 0.
        SORT itab_marc BY matnr werks fevor dispo ekgrp ekgrp beskz.
      ENDIF.
      IF itab_marc[] IS NOT INITIAL.
        SELECT matnr  "Material No
               bwkey  "Plant
               bwtar
               vprsv  "Price control indicator
               verpr  "Moving Average Price/Periodic Unit Price
               stprs  "Standard price
               peinh  "Price unit
               FROM mbew
               INTO TABLE itab_mbew
               FOR ALL ENTRIES IN itab_marc
              WHERE matnr EQ itab_marc-matnr
              AND bwkey EQ itab_marc-werks.
        IF sy-subrc EQ 0.
          SORT itab_mbew BY matnr bwkey.
        ENDIF.
      ENDIF.
      IF itab_marc[] IS NOT INITIAL.
        SELECT   matnr     "Material No
                 werks     "Plant
                 lgort     "Storage Location
                 labst     "Valuated stock with unrestricted use
                 umlme     "Stock in transfer
                 insme     "Stock in quality inspection
                 einme     "Total Stock of All Restricted Batches
                 speme     "blocked state
                 retme     "Blocked state return
                 klabs     "Unrestricted-use consignment stock
                 kinsm     "Consignment stock in quality inspection
                 FROM mard
                 INTO TABLE itab_mard
                 FOR ALL ENTRIES IN itab_marc
                 WHERE matnr EQ itab_marc-matnr
                 AND werks   EQ itab_marc-werks.
        IF sy-subrc EQ 0.
          SORT itab_mard BY matnr werks.
        ENDIF.
      ENDIF.
    Kate

    I have 2 proposals.
    First to make it more readable, write mara as a marc as b and denote each field with a~ or b~ in field list and where condition.
    You should sort the internal tables by the full key, i.e. also bwtar and also lgort.
    And if possible use sorted tables with unique keys.
    Siegfried

  • I don't know how I can optimize this SQL

    Dear ALL:
    I don't know how I can optimize this SQL.
    Is it possible to make a better SQL or PL/SQL?
    Please let me know your good thought.
    Thank you.
    Sincerely,
    ===========================================================
    (SELECT     A, B, C, SUM(D) as D, AVG(E) as E
    FROM      T1, T2
    WHERE     T1.timestamp BETWEEN TO_DATE('00:00:00','HH24:MI:SS')
    AND TO_DATE('01:00:00','HH24:MI:SS')
    GROUP BY A, B, C
    UNION ALL
    (SELECT     A, B, C, SUM(D) as D, AVG(E) as E
    FROM      T1, T2
    WHERE     T1.timestamp BETWEEN TO_DATE('01:00:01','HH24:MI:SS')
    AND TO_DATE('02:00:00','HH24:MI:SS')
    GROUP BY A, B, C
    UNION ALL
    (SELECT     A, B, C, SUM(D) as D, AVG(E) as E
    FROM      T1, T2
    WHERE     T1.timestamp BETWEEN TO_DATE('02:00:01','HH24:MI:SS')
    AND TO_DATE('03:00:00','HH24:MI:SS')
    GROUP BY A, B, C
    UNION ALL
    (SELECT     A, B, C, SUM(D) as D, AVG(E) as E
    FROM      T1, T2
    WHERE     T1.timestamp BETWEEN TO_DATE('03:00:01','HH24:MI:SS')
    AND TO_DATE('04:00:00','HH24:MI:SS')
    GROUP BY A, B, C
    ORDER BY A ASC, B ASC, C ASC
    ===========================================================

    Dear Warren:
    Actually, for this query, it takes a few second to complete the query.
    But, I have to create several time period and I have to optimize the SQL.
    Time period is 1 hour, 30 min, 15 min, 5 min.
    That is,
    ===========================================================
    WHERE T1.timstamp BETWEEN TO_DATE('00:00:00','HH24:MI:SS')
    AND TO_DATE('01:00:00','HH24:MI:SS')
    UNION ALL
    WHERE T1.timestamp BETWEEN TO_DATE('23:00:01','HH24:MI:SS')
    AND TO_DATE('24:00:00','HH24:MI:SS')
    ===========================================================
    WHERE T1.timstamp BETWEEN TO_DATE('00:00:00','HH24:MI:SS')
    AND TO_DATE('00:30:00','HH24:MI:SS')
    UNION ALL
    WHERE T1.timestamp BETWEEN TO_DATE('23:30:01','HH24:MI:SS')
    AND TO_DATE('24:00:00','HH24:MI:SS')
    ===========================================================
    WHERE T1.timstamp BETWEEN TO_DATE('00:00:00','HH24:MI:SS')
    AND TO_DATE('00:15:00','HH24:MI:SS')
    UNION ALL
    WHERE T1.timestamp BETWEEN TO_DATE('23:45:01','HH24:MI:SS')
    AND TO_DATE('24:00:00','HH24:MI:SS')
    ===========================================================
    WHERE T1.timstamp BETWEEN TO_DATE('00:00:00','HH24:MI:SS')
    AND TO_DATE('00:05:00','HH24:MI:SS')
    UNION ALL
    WHERE T1.timestamp BETWEEN TO_DATE('23:55:01','HH24:MI:SS')
    AND TO_DATE('24:00:00','HH24:MI:SS')
    ===========================================================
    Do you know how this SQL is optimized?
    Thank you,

Maybe you are looking for

  • Error while moving Data from fs to its corresponding Structure

    Hi Gurus, I am getting a run time error  (Operands are not Convertible) while executing the below statement: MOVE <fs> TO  ls_struc. [ Over here: ls_struc is TYPE XYZ (a custom structure containg 7 fields, out of which one field is type Packed decima

  • Better query

    Hi Folks, suppose col1 col2 1 2 3 4 5 6 7 8 9 10 how can i able to get the output like result 1 2 3 4 5 6 7 8 9 10 please suggest me.with my knowledge i wrote like this. Is there any easy(logic) way rather than this, to simplify query lines??? select

  • Problem getting vertical scroll bar in tree

    Hi, I am adding nodes to a tree control dynamically. But somehow, a vertical scroll bar doesn't appear during the process. I guess, somehow, the tree is not able to detect the change in the height, hence, is not giving the vertical scroll bar. Howeve

  • Java.lang.NullPointerException in Parser

    Hi, I appreciate any idea that can help me. I'm processing a sql sentence that can retrive 10.000 rows with XSU. I generate xml files with 1000 rows from the resultset and then I transform this xmls into xml files based of Onix Standard. I've nullpoi

  • How do I get picture control to display PNG images with transparent background?

    I have an image of a robot arm looking from the top with a transparent background and saved as PNG. When I drag the image directly to LabVIEW front panel, the image shows properly with the transparent background, but I want to manipulate it such as r