Name an image in Imagelist

Sir
I want to retrieve some images from database and store them in an Imagelist. I want to name or tag each image so that I can refer each image in another place by its tag or name
I tried the below code:
Friend Function getImage(ByVal ID As Integer, ByVal Terminal As String) As ImageList
Dim imgList As New ImageList
conn = New OdbcConnection(connectionString)
conn.Open()
sql = "SELECT Image, AutoId from Images where (ID='" & ID & "' AND Terminal='" & Terminal & "');"
da = New Odbc.OdbcDataAdapter(sql, conn)
Dim ds As New DataSet()
da.Fill(ds, "Image")
Dim dt As DataTable = ds.Tables("Image")
Dim drow As DataRow
If dt.Rows.Count <> 0 Then
For N = 0 To dt.Rows.Count - 1
drow = dt.Rows(N)
Dim imageData As Byte() = DirectCast(drow("Image"), Byte())
If Not imageData Is Nothing Then
Using ms As New MemoryStream(imageData, 0, imageData.Length)
ms.Write(imageData, 0, imageData.Length)
ms.Seek(0, SeekOrigin.Begin)
imgList.Images.Add(Image.FromStream(ms, True))
imgList.Images.Keys(N) = drow("AutoId") End Using
End If
Next
End If
Return imgList
conn.Close()
conn.Dispose()
End FunctionThe line   imgList.Images.Keys(N) = drow("AutoId")  does n't work. Please tell me how to do thsi??Regards
Manoj

The imagelist offers no advantages for this usage.
I disagree - it depends on what he needs it for.
Some controls require an ImageList (if it's to show thumbnail images) and the ImageList has a .ImageSize property
that will automatically re-size the images.
You may very well be right but until we know the intended use, I can't agree with your assertion.
Which, it is as old as Methuselah from before the generic collections did exist. In classes made with generic collections you can add everything. 
Success
Cor

Similar Messages

  • Brand new macbookpro; recent install Yosemite; computer now opens to my name and image but no place to put the password but nothing happens when trying to click on restart etc.

    Macbook Pro purchased December 2014.....was fine until update iOS  to Yosemite 2 days ago. Now, when turned on my image with my name comes up on the screen...no place to put your password.....at the bottom...restart, but used cursor to click on the restart and also my name, the image etc....nothing happens.
    I shutdown to go into the Recovery OS....and got the screen about resetting the password....which doesn't need reset. The third choice seemed more appropriate regarding the keyboard...but could not click on any of them with the cursor.
    Spent an hour with Apple support who ended up referring me to an Apple store that's a 100 mile round trip from me. Can't believe they can't help me...and can't believe this is happening to a brand new Mac.....guess Apple is no different than any other computer...install an update or upgrade...and immediately have problems.
    Exasperated,
    Joe......good thing my Dell is working

    Resetting User Password in Lion and Mountain Lion
    Boot into your Recovery Partition by holding down the Command and R keys whilst booting.
    When the Recovery screen appears, go to the Utilities menu and open Terminal.
    In Terminal, type:
    resetpassword
    ...a small app will open and allow you to choose the user for whom you want to change the password. If you are the admin, be certain that you choose your admin user. Type in your new password twice and give yourself a good hint. Click OK (or Done or whatever) and reboot, enjoying the use of your new, hopefully memorable, password.
    Good luck,
    Clinton

  • I want to find the image tag name from Image layer name InDesign JavaScript?

    I want to find the image tag name from Image layer name InDesign JavaScript?

    Hi,
    You can use following script to fetch image tag name and the layer name on which it lie:
    var imgBox = app.activeDocument.rectangles // fetch all rectangular frames from the active document
    for(var i = 0; i< imgBox.length; i++)
      if(null != imgBox[i].associatedXMLElement )
                var b = imgBox[i]
               alert("Image tag name "+imgBox[i].associatedXMLElement.markupTag.name + "\n exist on layer " + imgBox[i].itemLayer.name)
    Hope this would help you to resolve your problem.

  • File names of images in IPhoto

    I have two questions. Does anyone know how to see the photo/file name of images loaded into IPhoto? Is there a setting that you can turn on to show the file name under each image?
    Secondly. While trying to find answers to the above question I did discover the export originals option which would allow me to export images into a separate folder that does list the image numbers. This is a work around but not really what I'm after.
    Doing this export I did get a folder of images with their respective file numbers attached. However, what is interesting and I'm hoping someone can answer is that many of the images that should have had my own personal image number, were actually labeled Slide 1, slide 2, etc, etc. When I originally imported these images they contained a number that looked like this 00478-22135. Does anyone know if the dash between the number may not be recognized by IPhoto which it then just labels a generic number it makes up on import? Or any other reason why it would not have accepted my original file name? I know it does accept some file names since several images with a different number format such as D223567 imported just fine and then exported with the correct original file names. Any suggestions are greatly appreciated.
    MacBook Pro Mac OS X (10.4.7)
    MacBook Pro   Mac OS X (10.4.7)  

    Jim:
    Under the View menu select "Titles" to get the file names. I don't know what you did but I just tried an import of a file titled 00478-22135.jpg and it kept the file name OK.
    When you exported the files what was the Album name and did you use the "Use Album Name" option in the export". If the Album was titled Slides then you would get new file names titled "Slide-1.jpg", etc. That may be the reason.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB file backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • Can I include the file names of images in the image itself?

    *How can I get the file names of images on each image (without entering them by hand)?*
    (I am bring 250 images into a Keynote document, with each image on its own slide. I want to have the file names of the images shown on each slide or image. This doesn't need to look nice.)
    (If I can't do this in Aperture, I also have Photoshop Elements. Is there a way to do that in Elements?)

    You can't do this directly via Ap3. There are plug in's i believe that make it possible. Maybe someone knows more? Allan

  • Get the font names and image names in QXD

    Hi,
    How to get the font names and image name in Quarkxpress document file using java?.
    Is any third party packages for getting font n image names in QXD?
    thanks,
    nithya

    rtuck,
    I believe this may solve it:
    Open System Preferences and go to Accessibility. Next, select Display from the source list along the left, then check the box labelled Reduce transparency.
    It was first presented in this post #15 by TheUlser:
    https://forums.adobe.com/message/6854594#6854594

  • Any way to keep original file name as image name for web gallery?

    Hi,
    I wonder if there is any way to keep the original file name as image name for a web gallery (instead of "picture-1.jpg)
    People often send us the thumbnails or the image from the web and we have to search forever to find the image in AP - if we could keep our original filename then this would be a second away.
    Hope somebody has an idea
    thanks

    Hi William,
    I finally had time to play - unfortunately it does
    not work the way you described above.
    I´m just exporting a set of images using the "Stock
    Black" Theme - marked name only - batched the
    filename to masterfile - but the actual picture names
    are still "picture-1.jpg" - "picture-2.jpg".
    did I miss anything? thanks
    I see what you want, you don't care about the screen name so much but want the generated file names to be the same as the version names. From earlier messages though I am not quite sure why this is a problem, since you said other people were picking the images they wanted - say Image1 and 23 and 8. That to me says those people are going through the directory using Finder or Explorer, not using the HTML.
    Is it the case you are giving people web galleries on CD? If so, then perhaps also export a "browse" directory with exported images using the version names, so that people can use the right name.
    Or perhaps it's the case that people are downloading the images from the web, and then using the downloaded file names to send you requests. I'm not sure how to fix this yet and do not know if 1.1 offers something for this.

  • Scanning a document but only offer in file names are image options

    I am trying to scan a document but my only options in the file names are image file names (.jpeg, bitmat etc...) I tried running the HP fix I found in another forum answer, downloaded and ran it, ran a test scan and saw all sorts of options including pdf. My test scan ran great, and my document scanned in as a .pdf. I then tried to scan again but again my only options were as an image file names. I restarted my PC but still the same issue. I am running windows XP.

    In the print dialog of Acrobat choose 'Form fields only'.

  • Is it possible to know the file name of images loaded?

    Hi:
    I have a folder containing some images named 01_image_name.jpg, 02_image_name.jpg, 03_image_name.jpg, ... wich names I read with a PHP script. Then I loop loading each image and waiting until all are loaded to display them
    1. The PHP script reads file names and returns a string with names separated by a "|" char, then I use the split method to store them in imagesNames array and sort it
    2. I loop trough imagesNames array loading images
    3. Anytime a new image arrives I push it in imagesContainer array and check if all images are loaded to show them
    The problem is there's no guarantee they arrive in the same order they were requested. So, how I sort the imagesContainer array by file name, i.e. in the same order they are in imagesNames array?
    Thanks in advance

    if you know when a new image arrives and you can retrieve that new image file name ...
    Well, that's precisely my doubt, how can I know the file name? Is there a property/method for it?
    function loadImages() {
    for (var i:int=0; i<imagesNames.length; i++) {
    var imgLoader:Loader=new Loader;
    imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,imgLoaded);
    imgLoader.load(new URLRequest(imgPath + imagesNames[i]));
    function imgLoaded(par:Event):void {
    trace(par.target,par.target.content,par.target.content.name);
    Output window:
    [object LoaderInfo] [object Bitmap] instance160
    [object LoaderInfo] [object Bitmap] instance159
    [object LoaderInfo] [object Bitmap] instance161    

  • File Name of Image Displayed in PSE 8 does not match File Path Name in Windows 7

    I recently got a new computer  .I upgraded on my Windows XP computer from PSE 5.0 to PSE 8.0.  I then moved my files to the new computer running Windows 7 following the instructions I received on an earlier post.  I copied the catalog folder and the picture folders on the C drive from the old to the new computer (catalog folder to location specified in System Info;  images to My Pictures).   Everything appears to have worked beautifully without having to go through a big Reconnect struggle.  The organzer appears to have found all of the images and I can bring them up in Editor as well.  However, when I look at the properties of a given image the full file name displayed is what it was on XP, i.e., C:\Documents and Settings\<username>\My Documents\My Pictures\<folder name>\<file name> rather than the path as it is in Windows 7, i.e., C:\Users\<user name>\My Pictures\<folder name>\<file name>.  I am new to Windows 7 so maybe I am missing something unique to Windows 7 but I would appreciate any information.

    You're observing the special folder aliases that Vista and Windows 7 create to preserve backward compatibility (Microsoft keeps changing how and where users' documents are stored).   On Windows 7:
    C:\Documents and Settings\<username>\My Documents\My Pictures
    is a special kind of alias to the folder:
    C:\Users\<user name>\Pictures
    (And C:\Users<user name>\My Pictures is yet another kind of Windows 7 special alias, a "library", that includes the folder C:\Users<user name>\Pictures.)
    Whenever an application like PSE refers to the old location, C:\Documents and Settings\<username>\My Documents\My Pictures, Windows automatically translates that under the covers to C:\Users\<user name>\Pictures.   But Windows Explorer is configured to prevent you from accessing C:\Documents and Settings\ interactively -- only programs like PSE are able to do that.  Microsoft wants users of Windows Explorer to always use the "new" name,  C:\Users\<user name>\Pictures.
    In your case, your catalog contained the old XP folder paths, and Windows is automatically translating them on the fly to the new paths, unbeknownst to PSE.
    Like most such backward-compatibility hacks, this does not work perfectly.  PSE thinks that the old path and the new path refer to two completely different folders.  I'm not positive, but I think there are opportunities for PSE to get confused by that.   When you import new photos, they will get recorded in the catalog under the new folder paths.
    In my previous recommendation for how to move to the new computer, I had assumed that you would most likely be changing user names and photo locations, and thus you would be forced to do a Reconnect, and you wouldn't have encountered this.  If I had thought you weren't going to need a Reconnect, I would have recommended not using this method but rather using Backup/Restore (my first recommended method)  -- my bad.
    It may well be that your current catalog and PSE will work well enough.   But there is at least a small risk that down the road PSE will get confused by the old and new folder names.  The easiest way to avoid that risk would be to start over and use the Backup/Restore method for moving your catalog, whch is more effort on your part.  But because I don't fully understand the risk, I can't tell you whether you should be worried about it.   Definitely do some testing: editing, importing and editing new photos, use Display > Folder Location view, try renaming and moving old photos to new folders, try the Photo Downloader, etc.

  • Copy and paste file names from images

    I want to copy and past the names of multiple photoshop files into an email. In 10.3.9 I could select them all and copy and paste..now with mail 2 and 10.4.3 when I do that it actually pastes the image file themselves..is there something that I can change pref wise to get it back to the old way..very time consuming this way. I don't want to haveto do them individually..I hope!

    Hi CGI,
    I've been playing with it and the only workaround I found so far is:
    Drag to select the files in the finder window
    Command C to copy
    Open TextEdit
    Go to Edit>Paste and match style
    You will now have the list of file names in Textedit
    Select all and copy to your email message.
    I tried to figure out an automator workflow for it but since I have never used Automator I was kind of lost.
    Lori

  • Weird symbol in file name and images by pixel instead of size?

    i my filenames i sometimes see a weird box with what looks like a script "x". is this some kind of default symbol that indicates i am using a non standard symbol in this file name? it sometimes happens after i drag and drop something say from my desktop to my laptop.
    also, is there any chance of being able to see pixel size of images in a Finder window in addition to or instead of File size?
    Thanks.

    Some things about this.
    1. Ignore the back slash in front of the space.  That's the terminal shell convention for escaping (making significant) special characters that follow the back slash (in this case a space).
    2. A pathname like ~/foo/bar is another shell convention where the tilde is a shorthand for your home directory.
    3. I am not convinced that the weird stuff is not there in the Finder display.  I think it just doesn't show in the Finder's desktop font.
    4. I am going to use your example for the following discussion.  Extrapolate where needed.
    The terminal shows a pathname like /Users/homename/Desktop/_evolute\ tutes, i.e. with some kind of garbage character(s) after tutes.
    In terminal type cp followed by a space and drag that tutes file into the terminal window.  I think it will look something like this (don't hit return yet).
    cp /Users/homename/Desktop/_evolute\ tutes
    Now type a space and add ~/Desktop/foobar on to the end of the line.  It should now look like the following:
    cp /Users/homename/Desktop/_evolute\ tutes  ~/Desktop/foobar
    Hit return.  You should see a file called foobar on your desktop (unless you get an error because the shell didn't like those special characters at the end of the pathname, in which case we have to quote it, but ignore that for now and we can address that in a followup post).  All this did was copy your file to the desktop with a different name, foobar in this case.
    Now I propose that the file foobar is named just that.  If you throw that in the trash, do a get info on it, or drag it back into the terminal window, it should still be just the name foobar.  Nothing else at the end of it.
    If all this goes as I described, then the moral of all this is that however that original problematic file (or files) was created somehow something added those non-printable characters to the end of the name.  In some fonts it shows as best the font being used can show it.  In others they remain invisible because there is no representation in that particular font.
    ...on the other hand, I could just be wrong about all of this!

  • How do you add the files name to images within a PDF

    I have been searching the web trying to find an answer to this question, I am not sure what the proper term is called, but I refer to it as a 'coded pdf'. Hopefully someone knows what I am talking about and can help me find an answer!
    The end product is a coded PDF that has the file name of all the images lableled on top the image. For example, a product brochure that has 500 images, all of them would be 'coded' with their file name, to find easy in source files. - Is this an export option in InDesign, or an option somewhere in Acrobat?
    Thank you in advance for any help.
    -Melissa

    No, Melissa's asking for a filename that's searchable - text made of pixels is no use.
    Acrobat cannot apply the original image filenames after the PDF has been created as it can't read the information from anywhere. You have two options, both in InDesign:
    use smart captions to add the name of the file in a visible format beside each image.
    use accessibility tagging and place the image filename in the ALT TEXT field, then export the PDF with tags enabled (the filename will not be visible on the page but will show if you hover your mouse over the image).

  • Image upload safari ios6 issue -file name always image.jpg

    I could not wait for ios6 when I found out safari allowed for image / photo upload through safari web forms.
    I tested and see the image in form..hit submit and it uploads with the file name image.jpg
    Do it again and same file name for a different photo. This is completely useless. If I upload to my website it just overwrites. 99% of the masses need a unique name, when uploading. Why can it now use the file name in the photos folder?
    Even emailing them out it holds a generic name.
    Looks like an easy fix...insert file name not default name. Lets fix this Apple..or your new feature is as worthless as not having it at all.
    Disappointed to say the least...no I am dumbfounded.

    @kdmasterdas: How did you rename the file??
    It really *** that Apple is not fixing this problem while it's a big problem, especially in a business environment.

  • Script : Crops and name one image

    Hello there,
    I'm completely new with scrip on photoshop.. I know there is a way to use one image for different crops and name them. There is no batch involve.
    Which means :
    -Click on the script, a croping open, crop it, got a message saying if the crop is okay, click okay, then a box open, you can choose a name and save, then it follows by two others similar crops.
    Sorry, not easy to explain. Is that a plug or a script? or both?
    I basically end up using one image for 4 different crops and names, with a file saving like ??_xx_xx_xx_?? (?? : the name I selected, xx : the name of the image)
    How to code this, is anyone knows?
    Thank you!

    endofthenight wrote:
    Without having javascript or coding knowledge I won't be able to recreate this tomorrow......... ahh
    No
    While program knowledge would enable you to create a fully automated process you can do what you want to do with an action without any programming.  It can not be done without thinking and planing.  While recording an action is extremely easy to do. Crafting an action like you described takes some knowledge, planning, skill and practice.
    Adobe forums like this one is a good place to acquire missing knowledge.  There are many here with a lot of knowledge that are willing to help other learn.
    First the thread belongs in the Photoshop General Discussion forum this forum is for users interested in scripting. Scripting is use by a very small subset of Photoshop users with programming skills and is best outside the other main stream forum.
    As I wrote I would have no problem crafting an action like you want.  However if I do you learn very little and I think perhaps I just been used.  If you have a problem recording the action you can ask how would some one do this or that.  Then perhaps many would respond with how they woul do something.  You and otheres  would see how other do something. Some of the ways may be better the others.  You can take your pick.  The important to to me is knowledge is being learned and spread.   Photoshop help and support is the pits one of the best Photoshop resources at you disposal are these Adobe forums.
    Now I'm going to ask you a favor. Please start a new thread in the Photoshop General Discussion forum where you ask for help crafting the action  you want.  Start be describing the action you want in great detail. Also please read the text file in may crafting action package.  They are written for the advance action creator short perhaps and cryptic but they detail some of the capability of the Actions Palette, contains some good guide lines to follow. Address the issue of document size a problem area many have problem with, It also provide some script written to be used within Actions so the action creator can record better action with some logic in them without the need programming the script. 

Maybe you are looking for

  • Easiest way to tell if a Job has failed

    Apologies if this is the wrong subject but I couldn't figure out which one covered my issue. We had a SQL Server failover to another server in the cluster. At the time, it was running a Job that has a single call to an SSIS package. That SSIS package

  • Email Migration Tool Error

    Hi, I get an error by using the Email Migration Tool Error with OCS Release 2 on a Linux RH AS 2.0 single box server: Exception in thread "main" java.lang.NoClassDefFoundError: oracle/mail/migration/migrate/Migrate Command: $ORACLE_HOME\bin\migrate.s

  • How can I get a new phone while under a contract?

    I got my iPhone 5c in December 2013 and had to get the screen replaced about 4 months ago. It was not fixed by apple. 2 months ago it dropped again and only the top of the phone smashed, though there were no problems and the camera could still be use

  • Username and Password is sent as clear text while accessing external Application

    While accessing external application from SSO, the username and the password is sent as a clear text even though the form method is given as POST. Actually the potal opens a new window and it disables the address bar. Still the user name and password

  • Missing shortcut in Mac osx 10.8.2

    Before I was able to browse all my open images in photoshop by using the shortcut F3, now the same shortcut places all the images on top of each other. Does anyone know if there is a short for what I want to do? I don't know if this really is an issu