locked
Image description in file RRS feed

  • Question

  • User642382989 posted
    How can I with asp.net (3.5) write image description (like tags) into the file itself (NOT database!), I need this for my web's photo album?
    Wednesday, September 17, 2008 2:20 PM

All replies

  • User-1757793930 posted

    You will not be able to add tags directly to the file. However you can try another approach of attaching an XML file (i know you said no database), but you will need something that keeps track of this information. I have many times done this.

    imagefilename: image1.jpg and named my xmlfile image1.jpg.xml  which is a valid name. Now when i load image1.jpg i know that there is a corresponding xml file which is simply adding on the .xml file extension.

    Wednesday, September 17, 2008 4:54 PM
  • User642382989 posted
    that is a nice idea.. still I think it's cumbersome for such a "easy" task. What about some general file description property (not using image tags)??
    Wednesday, September 17, 2008 4:59 PM
  • User-1757793930 posted

    You could always name your file what the description is. But then you might have long file names. Like below

    This_Is_Our_First_Camping_Trip_With_The_Boys.jpg. Then your code behind could do the below function. Which removes the underscores and the file extension.

    string title = imageFileName.Replace("_","");;
    title.Replace(".jpg","");

     If you like i could write a quick xml function for you that will pull a title and description out of an xml file

    Wednesday, September 17, 2008 5:02 PM
  • User587478106 posted

    Maybe you'll find some relevant information here:

    http://www.bobpowell.net/discoverproperties.htm

    http://www.eggheadcafe.com/articles/20030706.asp

    Friday, September 19, 2008 6:17 PM