Pass Image to .dll

Hi,
I found quite a lot of topics on passing images to a .dll, however I didn't quite find an answer to my problem.
I want to pass a reference to an Image to a .dll.
The reference is of Type void* myImage in the LabView configure-dll, and when I create a .c file, it changes to uintptr_t* myImage.
If I pass that reference to the function
     void*  IMAQ_STDCALL imaqImageToArray(const Image* image, Rect rect, int* columns, int* rows);
with the conversion (Image*)myImage, the function will always return a NULL-Pointer.
I know I can call all these function as VIs outside a dll, however I would really prefer calling them inside the .dll.
Some posts sounded as if this weren't possible, however I guess it has to be, as all the Vision-VIdo it.
Thanks for your ideas
Greetings
Solved!
Go to Solution.

Hi,
solved it myself, sorry to have bothered you!
For veryone who might run into the same problem:
Use the Image Datatype to Image Cluster.vi and pass the cluster to the .dll. It is in the folder National Instruments/LabViewX.x/vi.lib/vision/DatatypeCoversion
In the generated c-code, there will be a struct:
typedef struct {
    LStrHandle elt1;
    uint32_t elt2;
    } TD1;
where elt1 is the name of the picture and elt2 the address.
Say you've gt a function
void __declspec(dllexport) MyFunction(TD1 *ImageCluster, otherparameters)
you can now use the address elt2 to call tne imaq functions eg. like this:
Image *testImage;
testImage = (Image*) ImageCluster -> elt2;
uint8_t *ptr;
ptr = (uint8_t*) imaqImageToArray(testImage,imaqMakeRect(0,0,50,50),&x,&y);
Sorry again
Greetings

Similar Messages

  • Passing images to different views

    Hi all,
    I am currently working on integrating the camera into an app I am developing (first time working with camera and images), and I am trying to pass images to different views. I have worked with passing text with text fields to labels using prepareForSegue methods, but have not come across any clear examples of tutorials on how to take a photo, and move that captured photo along to different views, pretty much the same as the instagram camera process (image below to illustrate).
    In short, my scenario is:
    ...launch camera from button on home screen, then take a photo (currently want to use AVcapture framework) which once photo is taken/captured is sent to a UIImageView in a second view to crop and overlay text over the image, then submit to feed. If anyone can provide some sample code that would be very much appreciated.
    Thank you very much for any feedback.

    Hi Sethuraman,
    This is not possible with current design of product as exploration views are combination of components from different information spaces.
    You can raise an idea as stated above at www.ideas.sap.com
    Regards,
    Pranay Sharma

  • Passing Image data through JNI?

    Hello,
    I am trying find the fastest way to pass image data from Java through JNI. Passing Java images through JNI seems to be a very common thing to do so I expect there's an oft-used approach. Can anyone give me a good explanation of this or point me to some references?
    I need to pass the image data to a C++ function which operates on this data, writing the results to a destination buffer which goes back to Java and gets put back into an image.
    Currently, I'm using BufferedImages and getRGB to get an int array from my source image, passing this through JNI along with another int array to be used as the destination buffer, then calling setRGB with my destination buffer after the JNI function returns. getRGB() preserves the alpha channel of png files, which is functionality I need. The problem with this approach is that getRGB is extremely slow. It can take up to two seconds with a large image on my 1.2 Ghz Athlon. It seems to be performing a copy of the entire source image's data. Maybe there is a way to decode a jpg or png directly into an int array?
    -Aaron Dwyer

    Here's how you could do it for TYPE_4BYTE_ABGR
    BufferedImage img=new BufferedImage(13,10,BufferedImage.TYPE_4BYTE_ABGR);
    img.setRGB(0,0,0xff0000);     
    img.setRGB(5,1,0x00ff00);        
    img.setRGB(1,1,0xcafebabe);
    DataBuffer db=img.getRaster().getDataBuffer();
    int dataType=db.getDataType();
    if (dataType!=DataBuffer.TYPE_BYTE)
         throw new IllegalStateException("I can do it only for TYPE_BYTE");
    int imgType=img.getType();
    if (imgType!=BufferedImage.TYPE_4BYTE_ABGR)
         throw new IllegalStateException("I can do it only for TYPE_4BYTE_ABGR");
    DataBufferByte dbi=(DataBufferByte)db;
    byte[] array=dbi.getData();
    SampleModel model=img.getSampleModel();
    if (!(model instanceof PixelInterleavedSampleModel))
         throw new IllegalStateException("I can do it only for PixelInterleavedSampleModel");
    PixelInterleavedSampleModel pisModel=(PixelInterleavedSampleModel)model;
    if (pisModel.getPixelStride()!=4)
         throw new IllegalStateException("I can do it only for pixel stride of 4");
    if (dbi.getNumBanks()!=1)
         throw new IllegalStateException("I can do it only for 1 band");
    int scanlineBytes=pisModel.getScanlineStride();
    // Access the green Pixel on Position 5,1
    System.out.println( (int)array[5*4 + scanlineBytes] &0xff);     // Alpha        
    System.out.println( (int)array[5*4+1 + scanlineBytes] &0xff);     // Red        
    System.out.println( (int)array[5*4+2 + scanlineBytes] &0xff);     // Green        
    System.out.println( (int)array[5*4+3 + scanlineBytes] &0xff);     // Blue     I've added some checks to make sure we're accessing the data the right way.

  • My PrE 11 App Crashes during DVD Burn at ~72% thru Encoding Media - image renderer dll

    This error occurs consistently with a project I just started.  Project was initially created under PrE 2 then Copied via Archive and continued under Pre 11.  I'm a new user and I need some of your expert help to resolve this.  Windows 7 event viewer signature is as follows:   Hope you can help me with this I've spent 2 days working this so far.
    oops - don't know how to insert text (.doc) file here. Will add in later post. Thanks for your interest.

    Reporting progress this AM:
    Windows updates are installed and current in both HP (Win 7 64) and Dell (XP 32).  It appears anti-virus does not have any involvement in either case.  Last set of trials had Norton on and active and had predictable outcomes (more later).  Based on this mornings test cases it could be that Win 7 PrE 11 64 bit DVD Burn process (Sysinternals has PrE burn.exe running at 32 bits) is more sensitve to bad scene clips than the Win XP PrE 11 32 bit DVD Burn process.
    Test cases performed today...Methodology -- since my detailed examination of the Project timeline did not turn up any answers I proceeded with a set of Tests to remove major scenes from the offending project stating from the END and working forward performing a project save and PrE restart after each scene removal. 
    Test case A - removed last scene, reduced timeline total from 01:00:18:00 h to 00:58:00:16. The resulting autoplay DVD burn on HP Appcrashed at 74% thru 'Encoding Media'.  Last result prior to this was Appcrash at 71%.  I then tested this Project case A against the Dell autoplay DVD burn which was good as expected.
    Test case B - also removed the next to last scene, reduced timeline total to 00:54:07:28.  The resulting autoplay DVD burn on HP Appcrashed at 80% thru 'Encoding Media'.  Spotting a trend, I calculated the offending timeline event to be approximately 00:42:45:27 to 00:43:20:15.  Going to this point in the Project timeline I once more looked for any artifacts or gaps. Finding none I also removed the continuous sub-scene starting at 00:42:45:26 ending at 00:43:45:08. 
    Test Case C - Removing the sub-scene along with last 2 scenes reduced the Project total timeline to 00:53:13:18.  The resulting autoplay DVD Burn on HP Appcrashed this time at 82% thru "Encoding Media'. So...examining the total timeline scene at around 00:43:00:00 I find 13 more sub-scenes that are derived from a set of old 8mm film conversions to .avi files.  The sub-scenes are moderately adjusted for lightness and color and are a little out of sequence from the original .avi files.  So lets remove them all.
    Test Case D1 - Removing the last 2 scenes and the 4th scene from last, reduced the Project total timeline to 00:50:42:00. The resulting autoplay DVD Burn on HP was successful!  I then prepared a Travel-Menu-based DVD Burn on the HP with 3 scene markers and it also was successful.  So I believe the Project may be OK under HP Win 7 64 PrE 11 by removing or perhaps re-editing the 4th from last Scene.  To test this conclusion I will add the last 2 scenes back into the Project and try a Menu-Based Burn on both the HP and Dell platforms.  I believe it will work .. will report back.
    This conclusion does not explain the root cause(s) for the ProblemSignature 'Image Renderer dll Appcrash' but may establish a workaround for this project.  For the 4 Test cases iterated here I used the referenced Process Explorer Sysinternals to look into potential process conflicts.  After Test Case B the Sysinternals was used to examine the 'Adobe Premiere DVD burn.exe' thread (TID 4948, CPU 0.05).  Message reads " Dbghelp.dll Configured does not support the Microsoft Symbol Server. Please download & install the Microsoft Debugging Tools for Windows to get a version that works."  This action is way beyond my experience level.  I will await overwatch input and continue with workaround analysis.
    Apologies for tedious details...but, making progress. Thanks for listening & guidance. rdub

  • HT204003 how can i print a boarding pass image file from passbook?

    how can i print a boarding pass image file from passbook?

    I do not believe that Passbook supports printing. You can email, but not print. Then again I'm not sure what it actually emails, if that is a graphic of the card or what. I'm going to try it with my Starbuck's card, but there is no setting for printing within Passbook.
    EDIT: Actually it sends the email as an attachment for a Passbook card file, that cannot be handled by my computer. Hope that answers your question.
    Message was edited by: ChrisJ4203

  • Pass image name and path to flash from html

    Hello Flash Forum,
    I would like to use Flash to display a larger image in an
    HTML page that opens on top of a window with
    thumbnail images. The thumbnail page will be a php page. If
    the user clicks the thumbnail, I would like to open a swf that
    diplays the larger image. I would like to pass the path and name of
    the image to display to my swf. It would open a browser page (or
    just a swf file) over the thumbnail page. The use could then close
    the larger image display, and click another thumbnail, etc.
    How could I do this? I have a swf file that will display the
    image, but I would like to pass the image name from outside the swf
    file.
    Thanks for any tips,
    eholz1

    Hello jpsoul,
    Thanks for the suggestion. I did see some info on the query
    string aspect. I will take a look at the JavaScript
    external.ExternalInterface class as well.
    Thanks again,
    eholz1

  • Windows Error / Bad Image - wbemcomn.dll

    I'm getting this error message each time I open itunes:
    Quick Time Handler Window: iTunes.exe - Bad Image
    The application or DLL C:\WINDOWS\System32\wbem\wbemcomn.dll is not a valid Windows image. Please check this against your installation diskette.
    Does anyone know what this is and how to avoid getting it each time?
    4G IPod   Windows XP  

    Hi,
    Can you perform  SFC command  during Windows Recovery environment? Since I notice you see a report about the gdiplus.dll file.
    If you have any feedback on our support, please click
    here
    Alex Zhao
    TechNet Community Support

  • Wana get Images from dll

    Hell,
    I have stored some images in a dll file. now i want to use them in my project. How can i access them?
    Its urgent plz.

    http://forum.java.sun.com/thread.jspa?threadID=733398

  • LogonUI.ex​e bad image - authui.dll error. Cant system restore or restore to factory settings

    Hi,
    My notebook which is a HP pavilion dm4 beats edition computer which runs WIndows 7 home premium, was just bought 2 months and I've been using it just for 2 months.
    Yesterday morning it was working fine, and I didnt download any new software or do any changes but in the evening when i turned it on,
    after the 'starting windows' screen, it was this error message
    LogonUI.exe - Bad Image
    C:\Windows\system32\authui.dll is either not designed  to run on Windows or it contains an error.  Try installing the program again  using the original installation media or contact your system administrator the  software vendor for support.
    I tried safe mode, it goes back to the same error screen.
    When i try pressing f8 and go to 'last known good configuration' it goes to the error screen as well.
    I tried pressing f8 and going to HP recovery manager and selecting system restore but it says no system restore points have been created, when I try to create one or go forward, it says the computer is running in a limited state and its not possible.
    The option 'restore to factory settings' can not be selected, I dont know why. The cursor does not change colour of the option when it goes above it, and that option cant be selected.
    My recovery partition is there and I have not done any adjustments to it.
    The only thing that opens is a command prompt window, could you assist me on how to restore to factory settings through this? Because typing rstui.exe brings the same message saying no restore points have been created.

    I cant chose system recovery, the option cant be selected.
    When I can go onto command prompt after going to 'advanced boot options' but then typing sfc /scannow says the computer needs a reboot, once you reboot, its just the same thing.
    Normally starting windows or starting windows in safe mode gives the LogoUI.exe bad image error just before when I would normally scan my fingerprint or enter the password.
    I tried putting in a windows cd, but it wont let it 'repair the computer' but trying to reinstall windows, no hard disks are visible. Its like I dont have a hard drive.
    But you can go to command prompt and go into dir you can view all my files. But just searching for C, it says directory of C was not found.
    Its just really strange because the laptop worked fine in the morning, and in the evening, as soon as I turned it on, it was just this black screen and an error msg

  • Pass cluster through DLL to Teststand

    I have to pass  Time Stamp & number thr'  a cluster in a DLL to Teststand
    thts  generating error  System Level Exception.[Error Code: -17502] 
    the Cluster ProdOrder(in pic ) is generating Issues
    Attachments:
    clustertoDLLpass Error.PNG ‏149 KB

    the Custom datatype tht I have to generate for this Cluster in teststand  cld be also   the culprit
    I have added the Mytypes ini file  where I have defined     the datatype as ProdorderMYINI
    Attachments:
    MyTypes.ini ‏3 KB
    testDLL_CLUSTER.seq ‏5 KB
    clusterPO1.vi ‏9 KB

  • Apple Sync Notifier.exe Bad Image  icuin36.dll

    I get a Popup at Startup Saying "The Application or DLL C/Windows?System32/icuin36.dll is not a valid Windows image. Please check this against your installation diskette.
    The problem started when I upgraded Itunes from 9 to 10. I reinstalled and still the problem is still there.The first popup(corefoundation.dll) I got I solved by downloading the file into the System 32 folder.I downloaded this file and it gives me this message.Thanks ........Jim

    Shift the two dlls out of your system32 folder, Jim. Apple Application Support Installers don't know they're there, and that can lead to you getting trouble after an update if the dlls have been updated since then, and iTunes/QuickTime/Safari/Mobile need the newer version of the dll.
    Try uninstalling and reinstalling your MobileMe control panel. Does that clean up the AppleSyncNotifier.exe messages?

  • Lighroom 5 not passing image to Photoshop 5.1

    When choosing "Edit in... Photoshop CS5.1" the modified Lightroom image does not get passed to Photoshop.  Instead, the original image appears in Photoshop, even though Lightroom has created a stacked copy.  I have uninstalled and reinstalled both Lightroom 5 and Photoshop CS5.1, to no avail.  I have a secondary editor configured as as "Edit in..." option, and Lightroom passes the modified image to that program just fine.  It just has problems passing the image to Photoshop CS5.1.  Is there a setting in the Registry that needs to be tweaked?
    Michael

    When you use LR5 edit in function you should get a warning dialog that the ACR version in PS CS 5 is not up to date.
    If you are not getting this warning, in LR 5 go to edit> preferences> General tab> Prompts > click on "Reset all warning dialogs".
    When you next go to the edit in function the warning dialog will pop-up, select render using Lightroom.

  • Passing array to DLL

    Hi -
    I need to interface with a DLL. I can communicate fine with most of the functions, but I can't figure out how to configure Call Library Function for "GPIO_Init". Can anyone with more experience help me out? I've attached the header, and also the manual - it's section 3.8.1 (page 37)
    Many thanks,
    Jon.
    Solved!
    Go to Solution.
    Attachments:
    LibFT4222.h ‏11 KB
    AN_329_User_Guide_for_LibFT4222.pdf ‏748 KB

    See this recent thread with approximately the same question: http://forums.ni.com/t5/LabVIEW/FTDI-FT4222-DLL-calling/m-p/3146709
    In this case, you pass a LabVIEW array and configure the array parameter as an array, passed by array data pointer.

  • Newbie: Passing Structures between DLLs via Java

    A fairly high level question for you good people:
    I have two DLLs. The first DLL is called by Java via JNI, and needs to return something akin to a C Structure (say an int, a double and a string for simplicity).
    My Java code does not need to do anything with this data, except pass it to a second DLL for more processing (the second DLL for example needs to do something with just the double and the string).
    My question is, is this sort of thing practical to do using JNI (I have the DLLs already but can easily add the JNIEXPORT etc functions) ?
    (I have used JNI for a passing single values and arrays back and forth, but nothing with anything akin to structures).
    Many thanks in advance.
    Dave

    My Java code does not need to do anything with this
    data, except pass it to a second DLL for more
    processing (the second DLL for example needs to do
    something with just the double and the string).
    My question is, is this sort of thing practical to do
    using JNI (I have the DLLs already but can easily add
    the JNIEXPORT etc functions) ?
    Somewhere in memory a hunk is reserved for this. Your code does it or some external piece does.
    You have a pointer to that.
    It is very important that the memory does NOT go away until you tell it to.
    You cast the pointer to a long and return that to java. Your java piece keeps track of that.
    It passes the long off to the other dll. That dll casts it back to what is needed (a pointer) and uses it.
    If the second dll disposes of the pointer then you are done. If not then you must dispose of the pointer.
    If you want to keep it then you should add a 'destroy()' method in java that frees the pointer (native call) appropriately. This is also one of the few time where using finalize is probably appropriate as well.

  • Pass image from webdynpro app through context nodes

    Hi All,
    Just wondering is there any way I can pass dynamically images from my WDA app to my interactive form through an XML interface?
    I can upload my images into the MIME repository during design time, can I get the XSTRINGs of these, bind it to a context attribute then use the XML interface into the Interactive Form and have it bind that into an image field ?  (do I need to convert XSTRINGs into base64 encoded formats?)
    Sorry I'm a bit confused, a lot of the blogs I've seen all use ABAP dictionary based interfaces, is this the only way you can pass graphics from WDA into an Adobe Form dynamically?
    Also, what do we need to do to pass values from our WDA context into an ABAP dictionary interface form?
    Edited by: Danny Yee on Oct 7, 2011 10:10 AM

    Hi Danny,
    If you use file upload UI element in webdynpro, it will store the file in xstring format. Am not sure about images, but i think it will upload images also.
    what do you mean by ABAP dictionary interface form? is it adobe form? if yes, then in your case quite simple.
    first use upload ui element then read the xstring attribute value then try to bind  the same value to datasource property of adobe interactive form.
    Regards
    Srinivas

Maybe you are looking for

  • Abap dump error

    Hello The problem we are facing is.. We have installed the recent patch in order to get TAN included in Form 16 and it is working fine in r/3 but in ESS it is throwing dump error. The error states : Error in Abap 4 statement when processing an intern

  • Delayed Fill command and intermittent scroll zooms image size

    Since the last CC update I've noticed that the first time I open the Fill command it takes a moment or two to appear. Thereafter during the same work session, the Fill command appears immediately when pressed, as it should.  I am not using it with an

  • Displaying row numbers in tables

    Is there a way to get JTable to display row numbers on the left-most side of the table? Are there any functions in JTable that will allow you to do this? I am thinking that to do this, I will probably need to add a column to my table model and make t

  • Multiple (independent) Image Rotation

    Usually I'm good at finding information to solve problems by searching the forums. but honestly I've never seen this problem solved or ever heard any mention of it. . . . here goes. I'm writing a space shooter that uses images as the hero and enemy s

  • Why do emailed photos save as firefox documents and not jpeg? I don't even have an option!

    I can download the photos from Facebook as JPEG butwhen I open them from email to save, they only save as a firefox document. I don't even have the option of jpeg. Is there a way to correct or get around this than a technophobe can understand and exe