This is a discussion on Reading IPTC data from Nikon camera RAW images,JPEG,TIFF files using Adobe dll in C# within the C# Programming forums, part of the Software Development category; Reading and Writing IPTC Metadata using Adobe Photoshop DLL. Goals: This project is used to read and write IPTC and ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Reading and Writing IPTC Metadata using Adobe Photoshop DLL. Goals: This project is used to read and write IPTC and EXIF metadata. Steps: 1) Create a C# project. 2) Create two button control one for read and another for write. 3) Add the reference of Adobe Photoshop Dll. 4) Add the following namespace. using Photoshop; 5) copy the following code. Photoshop.Document ps; Photoshop.Application app; Photoshop.DocumentInfo psi; Photoshop.JPEGSaveOptionsClass jpgs; Photoshop.TiffSaveOptionsClass tiffs; 6)In the Read button control, Copy the following code. string iptc = ""; textBox1.Text = openFileDialog1.FileName; app = new Photoshop.ApplicationClass(); app.Visible = false; app.DisplayDialogs = PsDialogModes.psDisplayNoDialogs; app.Application.Visible = false; ps = app.Open(openFileDialog1.FileName, null); //app.ActiveDocument = ps; foreach (Photoshop.ArtLayer artlayerRef in ps.ArtLayers) { artlayerRef.Visible = false; } //ps.SaveAs("D:\\psaveimage", jpgs, null,2); psi = ps.Info; iptc = psi.Author.ToString() + "|"; iptc += psi.AuthorPosition.ToString() + "|"; iptc += psi.Caption.ToString() + "|"; iptc += psi.CaptionWriter.ToString() + "|"; iptc += psi.Category.ToString() + "|"; iptc += psi.City.ToString() + "|"; iptc += psi.CopyrightNotice.ToString() + "|"; iptc += psi.Country.ToString() + "|"; iptc += psi.CreationDate.ToString() + "|"; iptc += psi.Credit.ToString() + "|"; iptc += psi.Headline.ToString() + "|"; iptc += psi.Instructions.ToString() + "|"; iptc += psi.JobName.ToString() + "|"; //iptc += psi.Keywords.ToString() + "|"; iptc += psi.OwnerUrl.ToString() + "|"; iptc += psi.ProvinceState.ToString() + "|"; iptc += psi.Source.ToString() + "|"; //iptc += psi.SupplementalCategories.ToString() + "|"; iptc += psi.Title.ToString() + "|"; iptc += psi.TransmissionReference.ToString() + "|"; iptc += psi.Urgency.ToString() + "|"; MessageBox.Show(iptc); object obj = new object(); obj = psi.EXIF; MessageBox.Show(obj.ToString()); 7) In the write button control, Copy the following code. ps.Info.Copyrighted = Photoshop.PsCopyrightedType.psCopyrightedWork; ps.Info.CopyrightNotice = "Bala@Pdi"; ps.Info.City = "Chennai"; ps.Info.Caption = "Bala"; ps.Info.Author = "Balasubramanian.S"; ps.Info.Category = "MetaData"; ps.Info.CaptionWriter = "SBala"; ps.Info.Country = "India"; ps.Info.CreationDate = "06/14/2007"; ps.Info.Headline = "IPTC"; ps.Info.Title = "IPTC Check"; ps.Info.Urgency= PsUrgency.psSeven; ps.Save(); ps.Close(null); ps = null; app.Quit(); app = null; MessageBox.Show("Data Writed Successfully"); |
| Sponsored Links |
| |||
| Hi, Can I read and write all EXIF,IPTC metadata from the images with this application?Is it possible to read and write metada from the RAW image files as well? Thanks in advance.
__________________ Sathish Kumar.R ![]() Knowledge is meant to SHARE |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extract IPTC Metadata from jpeg and tiff image formats | Balasubramanian.S | C# Programming | 25 | 09-17-2008 11:59 PM |
| Reading EXIF, IPTC & ICC Profile metadata from an image using MagickNet in C# | letmein | C# Programming | 0 | 03-27-2008 12:42 AM |
| Applying ICC profiles to a TIFF,JPEG files using C# | oxygen | C# Programming | 1 | 02-28-2008 10:42 PM |
| Converting Nikon camera RAW images to JPEG,TIFF files using Adobe dll in C#.NET | oxygen | C# Programming | 5 | 08-16-2007 02:26 AM |
| Reading and writing EXIF meta data from jpg/jpeg,tiff images | oxygen | C# Programming | 0 | 07-15-2007 10:24 PM |