Save an image with partial transparen​cy

There appears to be no way to preserve alpha channel information when saving an image out of labview, even when using the IMAQ vision functions. That is to say, you can create a partially transparent image using labview, but you can't save it to disk. Is this correct?
global variables make robots angry

The issue boiled down to bad documentation. LabVIEW is cool,
but I really can’t wrap my head around how, given the very limited amount of
documentation, so much of it could contain goofy mistakes. The documentation
says that LabVIEW can’t handle a 32-bit image, and that it can only render
transparency as a binary mask.
Attached is a VI that demonstrates how to create partial
transparency in LabVIEW by building a 32-bit image with an alpha channel.
LabVIEW has no problem saving it out as a PNG. You can’t display it properly
with the picture indicator, but you can display it properly with the 3d picture
control. You have to ignore the documentation and switch the image bit depth
value to 32 and order the image data as groups of 4 bytes, alpha, red, green,
blue for each pixel.
Also, if you create a binary picture mask to be used with a
picture indictor, you need to add an extra column of bytes for no identifiable
reason. You’ll find that when LabVIEW reads in a PNG with an alpha channel, it
reads it in properly and creates a binary mask. You can save it out properly
and alpha channel info is preserved. The mask will be larger than expected
because of the weird extra column of bytes that isn’t mentioned in the
documentation. For instance, if you load a 600 x 400 PNG with an alpha channel,
the mask will be 30400 bytes long instead of 30000 bytes that would be expected
if the description of how the binary mask works was right.
Please note that there are two separate data structures (the
32-bit image data with an alpha channel and the binary mask with the weird
extra column) that are described incorrectly in the documentation for all of
the picture function help pages. Note that there are several lines in each affected
help page that need to be corrected.
I like LabVIEW because it’s great for communicating with NI
hardware, it’s easy to do parallel computing and it’s super easy to make a nice
GUI. I’ve used LabVIEW to write real-time target tracking software that works
on a wide range of targets in real video and I’ve used to it write a real-time
3D simulation using real imagery and real video including ground imagery,
transparent cloud imagery and real video of explosions. So, even though the
function libraries are not terribly robust, I know that LabVIEW has a good deal
of potential as a platform for serious programming work. I only started using
LabVIEW less than two years ago, so that should tell you that LabVIEW is fairly
intuitive to use.
However, I’m a little disappointed and frustrated with it
because I keep getting burned by poor documentation and silly bugs that eat up
programming time. LabVIEW is expensive software, and while the function
libraries are nice, they are somewhat limited. I think that National
Instruments should either offer much more functionality or do a better job
documenting and debugging the existing function libraries (of add-ons and
toolkits, too) in order to justify the cost of LabVIEW software.
Message Edited by Root Canal on 11-02-2009 05:33 PM
Message Edited by Root Canal on 11-02-2009 05:35 PM
Message Edited by Root Canal on 11-02-2009 05:37 PM
global variables make robots angry
Attachments:
transparency.zip ‏724 KB
nope.png ‏62 KB
32 bit with alpha channel small.png ‏599 KB

Similar Messages

  • How to save/export image with 3D grid

    I am in CS6 with the 3D workspace selected. I need to export/save the image with the grid viewable. I know this is possible as I have seen it on a few other images. The catch is I need it 300 dpi so I cannot just screen shot as png.

    I don't understand what's the problem? Can you please elaborate? Show some code snippets and tell where you stucks on.

  • How can I save an image with background transparency as an eps in photoshop?

    I have to submit an eps of my logo and I would like it to have a transparent background. I have googled this many times, followed all of the suggestions and I'm still having trouble.

    Follow the help text in PhS CS2. I have shown importat guidelines by bold text:
    "To save a path as an image clipping path
    Draw a work path that defines the area of the image you want to show.
    Note: Paths are vector-based; therefore, they have hard edges. You cannot preserve the softness
    of a feathered edge, such as in a shadow, when creating an image clipping path.
    In the Paths palette, save the work path as a path.
    Choose Clipping Path from the Paths palette menu, set the following options, and click OK:
    For Path, choose the path you want to save.
    For Flatness, leave the flatness value blank to print the image using the printer’s default value.
    If you experience printing errors, enter a flatness value to determine how the PostScript interpreter
    approximates the curve. The lower the flatness value, the greater the number of straight lines used
    to draw the curve and the more accurate the curve. Values can range from 0.2 to 100.
    In general, a flatness setting from 8 to 10 is recommended for high-resolution printing
    (1200 dpi to 2400 dpi), and a setting from 1 to 3 for low-resolution printing (300 dpi to 600 dpi).
    If you plan to print the file using process colors, convert the file to CMYK mode.
    Save the file by doing one of the following:
    To print the file using a PostScript printer, save in Photoshop EPS format, DCS, or PDF format.
    To print the file using a non-PostScript printer, save in TIFF format and export to Adobe InDesign,
    or to Adobe PageMaker® 5.0 or later.   "
    An image with clipping path contains everything outside the path as transparent.
    Tested actually by PhS CS6.
    Photoshop is not the right tool. Better use Illustrator or InDesign (ID for logos which are not too complex).
    Graphical objects in IL or ID reside on a transparent background without any selection or clipping path
    (PostScript concept).
    Best regards --Gernot Hoffmann

  • How to save a image with JSF and get your URL

    Hi
    I need to save a image to my file system and get your URL. I�m working with JSF.
    Ex.:
    1� Save a image Cup.jpg on the server
    2� Get your URL
    result: http://www.mysite.com/images/Cup.jpg
    Thanks!!!

    I don't understand what's the problem? Can you please elaborate? Show some code snippets and tell where you stucks on.

  • Save D image with line-scan camera.

    Hi guys,
    my work needs to  use a line-scan camera to generate 2D image. A scanner is used to achieve the object scanning (so, the object is still). I have already acquired the image with the program similar to the example LL Trigger Ring, but I don't know how to save the 2D image on disk. Besides, do you guys know any other good source where I can find more labview examples (I only know the NI find the example)?
    Any suggestions or idea would be appreciate!
    Thank you in advance. 
    Attachments:
    My labview program.JPG ‏52 KB

    You can save the image to the disk using IMAQ Write File 2. You can find (and post) additional examples on the Developer Community. If you have more questions, please let me know. Hope that helps!
    John B.
    Embedded Networks R&D
    National Instruments
    Certified LabVIEW Developer

  • Can you auto save an image with webcam?

    Is there a way to automatically save an image from the webcam to a folder without having to click a button, or can you make the button take the image and save it to a folder as well, without a pop up saying "choose the folder to save to"?

    answered in your other post on same subject

  • How do I save an image with hyperlinks so it can be put in an e-mail?

    I designed an e-mail and used the slice tool to insert hyperlinks. Now I want to save it so that it can be put in the body of the e-mail with the hyperlinks active and usable. Any suggestions?
    Thanks!
    BI

    When you preview the image from the save for web dialog box, it will open your browser to see the image. It also will have the necessary html code needed for the links to work. Just copy that html code and add it to your email code with the image.

  • How do I save an image with an incremented filename?

    I am new to LabVIEW and am working on acquiring and saving many 12 bit images.  So far I have a File Dialog box to allow me to select the path to save the file. After I select the path, how can I make each image acquisition filename after that increment by an integer and save automatically (i.e. image1, image2, image3, etc)?

    jpyung wrote:
    Thanks Warren for the VI. I'm new to labview so please bear with me. Just to make sure I understand what's going on in this VI, the first time the program runs, the "error" case structure runs, and then subsequently, the "No Error" diagram runs?
    The error case should only run if there has been an error.  I've attached a demo program (LV v7.1.1). Put it into the same folder as the "Generate Next Filename" vi and run it or watch it run. If you don't change it any before running it, the first time it is run it will create a subfolder in the folder containing the VI and then add 10 sequentially-numbered text files to it. The next time it is run, it will add the next ten files in the sequence and so on.
    Message Edited by Warren Massey on 03-13-2006 01:46 PM
    Attachments:
    Demonstrate next-file-name generation.vi ‏44 KB

  • How to save Buffered Image with variable transparency in a file.

    Hi,
    I need to save BufferedImage (type ARGB) in a file.
    Transparency in this image is a function of position. Who knows, what would be the best suggestion for type of file to store this image (probably not JPEG) and which package would be appropriate. A sample of code would be higly desirable. Please help, thank you in advance.

    Your can use the ImageIO-API if your software runs under JVM1.4 or you must use the JAI (Advanced Imaging API) ...

  • How to save an image withe hyperlinks (NL)

    Can someone tell me how i add hyperlinks to a part of my image. I created segments, but when i wan to save it for the web, the image saves itself in many gifs files. Can someone help me

    It works this way because the web works this way. Images themselves cannot hold interactive data. It's all in the HTML and CSS code.
    Mylenium

  • PSE 11 - How save image with printer color profile?

    I use an outside service to make prints. How can I save an image in PSE 11 in either TIFF or JPEG format with the color profile for the outside lab's printer? Thanks.

    You can print a photo using the correct printer profile for the lab printer. In the print dialog box , go to "Page Option>Color Management" and then choose Color Handling as "Photoshop Managers color". Now click the printer profile dropdown and choose the profile for your lab printer. If you are not able to find the profile for you printer  then choose "Printer Manages Color"
    To your second question the answer is that you cannot save the image with the correct colors for printing. You can only convert the profile of your image to Adobe RGB which matches gamut of most printer profiles using "Image Menu>Convert Color Profile and choose Adobe RGB.

  • HT4623 why cant i save phone image to photo album...its show save this image to your phone app?,,,,,but no image is save

    why cant i save phone image to photo album...its show save this image to your phone app?,,,,,but no image is save

    Hi FANMixco,
    To be clear, you can see the image from your file system but cannot access it from code?
    I'd like to know what could be my bug because I don't understand why I can access from the URL,
    -> If you can access the image from URL, you should definitely download it and use it, I'm not quite understand your question now.
    I'm not knowledgeable with chmod under Linux, let's say if we give it full accessibility, what will be the result?
    Anyway if you can see the image from file system, that already means the upload is succeed, I think you may need get some suggestion from php side to see how can we save the image with a correct permission.
    I will move the question to off topic, since the question is on the server side but not client side, which is out of the forum support scope, thanks for your understanding.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have only 5 different formats to save my image

    I just updated my photoshop to CC and I made a mask test on a picture and noticed i couldn't save the Image with more than 5 different options. The pic has transparency and I wanted it to be a PNG-file so it can manage transparency. HELP?

    Because you're using 32 bits/channel - which only a few file formats can support.
    Unless you're doing High Dynamic Range imaging and need the floating point pixel support -- you probably shouldn't be using 32 bit/channel.

  • Save As Image fails with PDF files

    Using Acrobat X Pro, version 10.1.7. After the most recent update, I can no longer crop a PDF file and save it in any image format. The options are there, but when I select File > Save As > Image > PNG (or JPG or any other image format) and enter the filename/location, no new file is created.
    This is about to become an emergency, since a big annual production project uses images from PDF files as illustrations in other documents.
    Any ideas?
    Elisa

    I have had the same issue but with Acrobat 7 standard.  No error message is displayed however no file appears when trying to save a pdf as JPG  or other imgae formats.  Repairing and re-installing has not helped.  Did you make any progress with this issue?
    Strangely if a different user logs onto the same machine they can do this with no problems.  I have tried to find something in the users profile which could be causing this but with no sucess.

  • When clicking "Save image as" how can I get Firefox to auto add a (1) (2) etc at the end of the filename if an image with the same filename already exists?

    How can I get Firefox to automatically rename images when clicking "Save image as" on the menu, when an image with the same file name already exists in the folder??

    Hello,
    That is not a feature that is supported natively within Firefox but there are various add-ons which I think will do the job you need.
    The one I have used is [https://addons.mozilla.org/en-US/firefox/addon/web-slide-show/?src=search Web Slide Show]. This is primarily an add-on for viewing a slideshow of images when they are presented as thumbnails on a web page. However once you are in the slideshow there is a download button which will download all the images in the slideshow. It will automatically rename the images if an image with the same name already exists in the folder.
    If you don't like that add-on then here are some others that may do the same job:
    * [https://addons.mozilla.org/en-US/firefox/addon/image-download-%E2%85%B1/?src=search Image Download II]
    * [https://addons.mozilla.org/En-us/firefox/addon/image-picker/ Image Picker]
    I hope that helps. Let me know if not.
    Also I notice that you are using Firefox v23. That is now an outdated version. To get the latest security updates I suggest updating to version 24. See the support article here: [[Update Firefox to the latest version]].

Maybe you are looking for

  • Populate values in pop up

    Hi I have a requirement like when I select a table row , a pop up should appear with the fields populated with the values of the selcted row. I need some pointers on how to populate the fields of the pop up with the selected row values. Both the tabl

  • Unable to submit a Reader-enabled PDF: "This operation is not permitted"

    Hi I've looked through the forums but haven't found an answer to this particular query: I've created a simple form (text boxes, radio buttons, and a submit button which should send the entire PDF to an email address). I have tried different options:

  • Error - Cannot read PoD ID

    Hi All, When I am downloading the meter reading order, I am getting the error that 'Cannot read Point of Delivery ID'. Message no. EUI041. I have not attached a PoD number to the installation and don't have the requirement to use the PoD object in my

  • Decimate array

    Hello: My name is Juan Crespo, and I write you from Spain. I have a problem with a Labview application I am developing. I hope you could help me. In my application, I read an interleaved array from a text file, the number of single arrays that are in

  • Problems saving/reimporting edited PPT slides back into Cap5/Mac

    Greetings, folks - 25 year Mac veteran here, new to this forum and Adobe products but an Apple Certified Pro w/emphasis on audio & video, experiencing some disappointment with Captivate 5/Mac's inability to integrate with PowerPoint as advertised.  I