Jump to content
How to Install Plugins ×

RAW FileType (2023-01-19)


null54

Recommended Posts

This is a LibRaw-based camera raw filetype  plugin for Paint.NET.

 

Compatibility: Paint.NET 5.0+
 
To install place RawFileType.dll, RawFileTypeOptions.txt and the LibRaw folder in the Paint.NET FileTypes folder (usually C:\Program Files\Paint.NET\FileTypes)
 
The decoding options can be changed by editing RawFileTypeOptions.txt.

The list of options for DCRaw is available here , dcraw_emu supports all DCRaw options except -D, -d, -P, -K, -i or -e.

The list of additional options supported by dcraw_emu can be found here.


By default the plugin loads the RAW images without metadata, to include the image metadata add -T to the command line in RawFileTypeOptions.txt.

 

btn_donate_SM.gif
Download:

 

RawFileType.zip

 

Source Code

 

https://github.com/0xC0000054/pdn-cameraraw

  • Upvote 5

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 1 month later...

Hi!

 

First of all, thank you very much for making this plugin. It helps me A LOT.

I do have one issue though. When the images get imported through dcraw, they seem to be processed with some kind of auto-leveling command. Would it be possible to import them as TIFFs or at least without the automatic adjustments? I do quite a bit of my photography at night and the images get brightened during import, and are, while not completely useless, very hard to work with.

Link to comment
Share on other sites

This plugin tells DCRaw to use the camera histogram for color correction when importing raw images.

 

Ideally Paint.NET would allow FileTypes to show a dialog when loading so that DCRaw could be configured for each image.

As that is not supported I could change the plugin to read the DCRaw options from some type of configuration file.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

This plugin tells DCRaw to use the camera histogram for color correction when importing raw images.

 

Ideally Paint.NET would allow FileTypes to show a dialog when loading so that DCRaw could be configured for each image.

As that is not supported I could change the plugin to read the DCRaw options from some type of configuration file.

Thanks for the explanation. I've tried messing about with Codelab but I'm out of my depth here.

I can provide samples if necessary. I know from GIMP that dcraw applies distortion and CA corrections by default (I haven't checked if this is the case here as well, but vignetting correction is definitely applied).

Edited by Giklab
Link to comment
Share on other sites

Hello Great plugin but is there a way that you can not have the colour correction active and have to true Raw image loads

 

Not any that are user friendly. :(

I could put the DCRaw settings into a configuration file in the FileTypes folder, but you would have to load the image again to test the new settings (and modifying the configuration file would require Administrator privileges).

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

+1 ^

Barring a UI, I don't think it gets any more user-friendly (I mean, we'll just have to string together the arguments we want, right?). And TBH, I never really liked to tweak *everything* before importing the file, like in GIMP and I guess Photoshop. I mean, at that point I might as well be using Rawtherapee.

Link to comment
Share on other sites

Added a configuration file to allow the decoding options to be changed.

File version updated to 1.1.0.0.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 2 weeks later...

I keep getting this error:


System.ArgumentException: Parameter is not valid.
 
   at System.Drawing.Bitmap..ctor(Stream stream)
 
   at RawFileType.RawFileType.GetRAWImage(String file)
 
   at RawFileType.RawFileType.OnLoad(Stream input)
 
   at PaintDotNet.FileType.Load(Stream input) in d:\src\pdn\paintdotnet\src\Data\FileType.cs:line 477
 
   at PaintDotNet.Functional.Func.Eval[T1,TRet](Func`2 f, T1 arg1) in d:\src\pdn\paintdotnet\src\Base\Functional\Func.cs:line 158

When I try to import my .raw, is anyone else getting this/how can I fix this?

Is it a problem with the image or my installation?
Link to comment
Share on other sites

Is it a problem with the image or my installation?

It appears that the TIFF file that DCRaw writes is not supported by GDI+.

Could you upload a RAW file that causes this and PM me a link?

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

I have  the plugin set to TIFF and I'm not seeing any problems. Are you sure you didn't simply misspell a command?

In any case, here are the settings that work for me: -w -6 -W -T

Link to comment
Share on other sites

I have  the plugin set to TIFF and I'm not seeing any problems. Are you sure you didn't simply misspell a command?

In any case, here are the settings that work for me: -w -6 -W -T

 

The plugin always uses TIFF, the -c and -T parameters are appended after the user specified options.

It appears that some generated TIFF files are not supported by GDI+. :(

 

I considered switching the plugin to use PPM which would eliminate the TIFF loading issues, but the resulting image would not include any metadata.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

The plugin always uses TIFF, the -c and -T parameters are appended after the user specified options.

It appears that some generated TIFF files are not supported by GDI+. :(

I considered switching the plugin to use PPM which would eliminate the TIFF loading issues, but the resulting image would not include any metadata.

Right, I can delete the -T then. It would also seem that PDN doesn't support 16bit tiffs, so I can remove that as well lol.

That is really unfortunate... I don't know enough to suggest anything else than a +1 to your PPM idea (2 versions maybe?). Could that be a bug in dcraw, or a currently unsupported camera? I recall having a similar issue a few years back, when my Rawtherapee saved unreadable tiffs - that was corrected in an update that included an updated dcraw.

Link to comment
Share on other sites

... It would also seem that PDN doesn't support 16bit tiffs, so I can remove that as well lol.

Correct, Paint.NET only supports 8-bit images.

 

Could that be a bug in dcraw, or a currently unsupported camera?

 

It could be a bug in dcraw or it could be a bug in GDI+, without the RAW file there is no way for me to check.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Changed the default output format to PNM to fix the GDI+ crashes with TIFF.

File version updated to 1.2.0.0.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 9 months later...

Updated to the latest 32-bit version of DCRaw and added a number of additional file extensions.

File version updated to 1.2.1.0.

  • Upvote 1

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 6 months later...

How do I install this? When I unzipped the file in the FileTypes folder of Paint.NET saving does not give me the option to save as .raw

Roos-Skywalker%20close%20up.jpg
Link to comment
Share on other sites

2 hours ago, RoosSkywalker said:

How do I install this? When I unzipped the file in the FileTypes folder of Paint.NET saving does not give me the option to save as .raw

 

This plugin only supports loading camera RAW images, it does not allow you to save any raw formats.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

  • 3 weeks later...

Perfect, found the older raw-plugin first and it couldn't read the CR2's from my Canon 100D/SL1 correctly (but could read the files from the 400D/XTi).

 

This one reads both perfectly, thanks.

Link to comment
Share on other sites

  • 1 month later...

Hey there, This is the second time for me to try to open raw (cr2 from a canon 5d III) files. It has again cost me a lot of time trying and reading. Incredible what I don't know about digital photography!

 

I managed to open the raw files with this above posted plugin (thanks!).

 

But the photos in pdn are much darker than the ones shown on the canon software or in FastStone Image viewer or the jpegs. I did not change anythinf in the camera.

 

Have you an idea how I could solve that? Is there a way to load the camera's colour profile to pdn?

 

9 x 13 cm. (4).pdf

 

Thanks a lot!

 

PS: It thake looong time to open the photos in pdn.

Link to comment
Share on other sites

And now I see: It's not only darker but the raw file seems to contain more picture information in it -> the sky in the Image Viewer is white, in pdn it is blue as it was.

 

Which is the "right" one that I should use? (if I may ask this question)

 

cheers

Link to comment
Share on other sites

5 hours ago, cnorke said:

Have you an idea how I could solve that?

 

You may need to change the DCRaw options, the list of options is available here.

 

5 hours ago, cnorke said:

Is there a way to load the camera's colour profile to pdn?

 

Paint.NET does not support color management, but DCRaw can convert the image to sRGB.

 

5 hours ago, cnorke said:

Which is the "right" one that I should use?

 

I do not know.

PdnSig.png

Plugin Pack | PSFilterPdn | Content Aware Fill | G'MICPaint Shop Pro Filetype | RAW Filetype | WebP Filetype

The small increase in performance you get coding in C++ over C# is hardly enough to offset the headache of coding in the C++ language. ~BoltBait

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...