This is a discussion on Converting Nikon camera RAW images to JPEG,TIFF files using Adobe dll in C#.NET within the C# Programming forums, part of the Software Development category; Convert NEF into jpeg or tiff Goals: This porject is used to convert NEF files into Jpeg or Tiff. Steps: ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Convert NEF into jpeg or tiff Goals: This porject is used to convert NEF files into Jpeg or Tiff. Steps: 1) Create a C# windows application project. 2) create a button control. 3) add the library reference of Adobe Photshop Type Library 8.0 4) Add the namespace using ps = Photoshop; using PhotoshopTypeLibrary; using K = PhotoshopTypeLibrary.PSConstants; 5) copy the following code. ps.ActionDescriptorClass ad = new Photoshop.ActionDescriptorClass(); ps.ApplicationClass app = new ps.ApplicationClass(); // specify the filename ad.PutPath((int)K.phEnumNull, "D:\\WorkArea\\FLASH\\UploadedFiles\\Monalisa.NEF" ); ps.ActionDescriptorClass ad2 = new Photoshop.ActionDescriptorClass(); ad2.PutString(app.CharIDToTypeID("CMod"), "Nikon D70"); // camera model ad2.PutEnumerated((int)K.phTypeColorSpace, (int)K.phTypeColorSpace, (int)K.phEnumAdobeRGB1998); // color space ad2.PutEnumerated((int)K.phTypeBitDepth, (int)K.phTypeBitDepth, (int)K.phEnumBitDepth16); // bit depth ad2.PutInteger((int)K.phKeySizeKey, 3008); // the width... why? ad2.PutDouble((int)K.phKeyResolution, 240.0); // DPI int ReUnID = app.CharIDToTypeID("ReUn"); // ??? ad2.PutEnumerated(ReUnID, ReUnID, app.CharIDToTypeID("PpIn")); // maybe this forces it ad.PutObject((int)K.phKeyAs, app.StringIDToTypeID("Adobe Camera Raw"), ad2); // identifies the target object app.ExecuteAction((int)K.phEventOpen, ad, (int)ps.PsDialogModes.psDisplayNoDialogs); app.Quit(); 6) run the application. Last edited by oxygen : 08-04-2007 at 12:04 AM. |
| Sponsored Links |
| |||
| Hi Oxygen, I am also working on the raw images conversion processing. Really its good for me. But in my project i have support all kinds of RAW images. do you have conversion for any other RAW image types? particularly i need for CRW,RAF type RAW images. It will be good if u give some idea on this. Thanks ![]() |
| |||
| Hi bala, You can use the below snippets for conversion. Photoshop.ApplicationClass app = new Photoshop.ApplicationClass(); app.Visible = false; app.DisplayDialogs = Photoshop.PsDialogModes.psDisplayNoDialogs; Photoshop.JPEGSaveOptionsClass jpgs = new Photoshop.JPEGSaveOptionsClass(); Photoshop.TiffSaveOptionsClass tiffs = new Photoshop.TiffSaveOptionsClass(); jpgs.Quality = 8; Photoshop.Document ps = app.Open(@"D:\pt.NEF", null); ps.SaveAs("D:\\psaveimage", jpgs, null,2); ps.SaveAs("D:\\saveImage1", tiffs, null, 2); ps.Close(null); ps = null; app.Quit(); app = null; hope its useful
__________________ The OXYGEN Delivers edgy, intelligent Technology to all... |
| |||
| Oxs I tried ur new code to convert the CRW files,but it say 'Out of Memory' issue. I have to implement these option in my prjoct very shortly. Please help me to come out from this issue. |
| |||
| Hi, I have tried to convert raw images using DCRAW. Dcraw is a raw converter used to convert more than 244 different types of raw images into tiff or jpg or ppm. Dcraw source can be download from the site Decoding raw digital photos in Linux as C or C++ source. Dcraw converts the raw image with Exif properties. Supported raw formats: CRW, CR2, MRW, NEF, RAF, etc.. Dcraw exe can be download from http://www.insflug.org/raw/. C# code to call dcraw exe: Process proc = new Process(); ProcessStartInfo startInfo = new ProcessStartInfo("dcraw.exe", "-T D:\\sample.CR2"); startInfo.CreateNoWindow = true; startInfo.WindowStyle = ProcessWindowStyle.Hidden; startInfo.UseShellExecute = false; proc.StartInfo = startInfo; proc.Start(); while (!proc.HasExited) { } proc.Close();
__________________ The OXYGEN Delivers edgy, intelligent Technology to all... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/c-programming/2272-converting-nikon-camera-raw-images-jpeg-tiff-files-using-adobe-dll-c-net.html | |||
| Posted By | For | Type | Date |
| Converting Nikon camera RAW images to JPEG,TIFF files using Adobe ... | Web Hosting | This thread | Refback | 10-30-2007 08:10 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extract IPTC Metadata from jpeg and tiff image formats | Balasubramanian.S | C# Programming | 27 | 01-06-2009 08:50 PM |
| Converting image from one format to another in C# | Sathish Kumar | C# Programming | 24 | 06-04-2008 02:06 AM |
| Applying ICC profiles to a TIFF,JPEG files using C# | oxygen | C# Programming | 1 | 02-28-2008 11:42 PM |
| Reading IPTC data from Nikon camera RAW images,JPEG,TIFF files using Adobe dll in C# | oxygen | C# Programming | 1 | 02-28-2008 11:33 PM |
| Reading and writing EXIF meta data from jpg/jpeg,tiff images | oxygen | C# Programming | 0 | 07-15-2007 11:24 PM |