Martin Osieka

'GiMP Native Format' FileType Plugin (.XCF, .XCFGZ, .XCFBZ2)

Recommended Posts

 

'GiMP Native Format' FileType Plugin (.XCF, .XCFGZ, .XCFBZ2)

Summary

Plugin which allows the digital image editor "Paint.NET" to load and save images in the GIMP native file format XCF (and its packed variants XCFGZ and XCFBZ2).

Author

Martin Osieka

Download

Find the latest version of the plugin ImXCF.FileType v1.4 (31.12.2014) here.

Installation

Follow the instructions carefully

  • Unzip "ImXCF.FileType vX.X.zip" and copy the two files "ImXCF.FileType.dll" and "ImXCF.Command.exe" into the "FileTypes" folder of your Paint.NET installation.
    A typical location is "C:\Program Files\Paint.NET\FileTypes".
  • f the "FileTypes" folder does not exist in your Paint.NET installation then create this folder first.

Compatibility

Paint.NET 3.5.11 and 4.0.5

Supported languages

  • English

Options

Mapping between XCF and PDN format

The load conversion includes all layers and some properties (name, opacity, visibility, blendmode, and alpha channel).
A layer mask will be merged to the alpha channel.
Layers will be clipped to the canvas and filled-up with transparent pixels.
Indexed and grayscale images will be converted to RGB images.
Blend modes not known in PDN will be converted to Normal mode.
Compression modes RAW and RLE are supported.
Packing modes GZ and BZ2 are supported.

The save conversion includes all layers and some properties (name, opacity, visibility, blendmode, and alpha channel).
Blend modes not known in XCF will be converted to Normal mode.
Compression mode is always RLE.
Packing modes GZ and BZ2 are supported.

Known issues

None

History

  • 1.4 (31.12.2014)
    - Fix to support Paint.NET 4.0.5 which is more strict in the order of serialized data
  • 1.3 (14.7.2014)
    - Minimal support for XCF format v003 (GIMP 2.8 layer groups)
    - Updated to ImXCF.Command 1.3
  • 1.2 (30.3.2014)
    - Updated internal links
    - Changed order of sub-filetypes in SaveAs selector
    - Small improvements in ImXCF.Command. Updated to ImXCF.Command 1.2
  • 1.1.1 (20.3.2013)
    Security update ImXCF.Command.exe (overflow issues)
  • v1.1:
    Bug fix: Pathname of the temp folder may now contain spaces
  • v1.0:
    Load XCF, XCFGZ, or XCFBZ2:
    - The load conversion includes all layers and some properties (name, opacity, visibility, blendmode, and alpha channel).
    - A layer mask will be merged to the alpha channel.
    - Layers will be clipped to the canvas and filled-up with transparent pixels.
    - Indexed and grayscale images will be converted to RGB images.
    - Blend modes not known in PDN will be converted to Normal mode.
    - Compression modes RAW and RLE are supported.
    - Packing modes GZ and BZ2 are supported.
    Save XCF, XCFGZ, or XCFBZ2:
    - The save conversion includes all layers and some properties (name, opacity, visibility, blendmode, and alpha channel).
    - Blend modes not known in XCF will be converted to Normal mode.
    - Compression mode is always RLE.
    - Packing modes GZ and BZ2 are supported

    Known issues v1.0:

    - Pathname of the temp folder does now allow spaces
  • Upvote 2

Share this post


Link to post
Share on other sites
RodD    0

Sweet! :)

But i get an "error cannot find file" dialog every time i go to load an existing XCF.

Then when i go to save a XCF i create in PDN i get an "unspecified error while trying to save xcf file"

Edited by RodD

Share this post


Link to post
Share on other sites

Sweet! :)

But i get an "error cannot find file" dialog every time i go to load an existing XCF.

Then when i go to save a XCF i create in PDN i get an "unspecified error while trying to save xcf file"

No idea in the moment ;-)

Please provide information about the operating system and the location and names of the files you are trying to load or save.

Are you able to use DebugView? Then we may switch on the log.

Share this post


Link to post
Share on other sites

There was a bug in the handling of the folder used for temporary files. This has been fixed in v1.1 (see first message).

I don't know if this fixes your issue RodD but because your are getting strange messages about files you may give it a try.

Share this post


Link to post
Share on other sites
RodD    0

There was a bug in the handling of the folder used for temporary files. This has been fixed in v1.1 (see first message).

I don't know if this fixes your issue RodD but because your are getting strange messages about files you may give it a try.

My specs -

Windows XP updated regularly.

My PDN Version -

Paint.NET v3.5.10 (Final Release build 3.510.4297.28964)

More info-

That still didn't fix the errors.

Can't run debug, sorry.

I did run the check for errors plug-in and found 5 corrupt dll files. (all deleted)

Running the utilities>View Plugin Load Errors dialog -

2 wouldn't load due to the fact they probably needed to be updated.

All those are gone now, but your filter still doesn't load XCF files for me.

Here is the xcf file i am trying to load. Basically though i tried several just to be sure.None would load.

I do have the pdn2xcf and xcf2pdn.exe files could those be causing your plug-in to fail?

Thanks.

SpaceButton_2012_RD.zip

Edited by RodD

Share this post


Link to post
Share on other sites

Running the utilities>View Plugin Load Errors dialog -

I'm not quite sure about your error message. Maybe you could add a screenshot.

All those are gone now, but your filter still doesn't load XCF files for me.

Here is the xcf file i am trying to load. Basically though i tried several just to be sure.None would load.

Loads fine here (Win7 64bit). Shows 7 layers in Paint.NET and GIMP.

I do have the pdn2xcf and xcf2pdn.exe files could those be causing your plug-in to fail?

No. They are just based on the same source. You may test if you can view your xcfs in the Image Browser Irfanview.

DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647) is not a debugger. It just catches debug output of applications and shows it in a window. To start the debug output of the plugin you have to add an environment variable.

Share this post


Link to post
Share on other sites
RodD    0

I'm not quite sure about your error message. Maybe you could add a screenshot.

Loads fine here (Win7 64bit). Shows 7 layers in Paint.NET and GIMP.

No. They are just based on the same source. You may test if you can view your xcfs in the Image Browser Irfanview.

DebugView (http://technet.microsoft.com/en-us/sysinternals/bb896647) is not a debugger. It just catches debug output of applications and shows it in a window. To start the debug output of the plugin you have to add an environment variable.

That's ok i can load them into PaintDotNet via a shellout script through Gimp.It turns the layer into an temp png, exports the file into PDN.I can then edit the one layer and send it back to Gimp. :)

I am just kind of curious why it will not work on my Windows xp 32 bit platform.Oh well.

Thanks for all your help though,

-Rod

Share this post


Link to post
Share on other sites

This reminds me that XCF v003 files are not supported in the moment.

The XCF version depends on the features you are using in the image.

v003 added support for layer groups in GIMP 2.8.

The Irfanview plugin has been updated already to support v003.

Will do this for the Paint.NET plugin if there is some time left.

Share this post


Link to post
Share on other sites
dragon451    0

Sweet! :)

But i get an "error cannot find file" dialog every time i go to load an existing XCF.

Then when i go to save a XCF i create in PDN i get an "unspecified error while trying to save xcf file"

 

I just saw an error like this.  Norton 360 had a bad reputation status for the ImXCF.Command.exe file and had quarantined it.  when I restored the .exe file from quarantine it then allowed me to open the file.

Share this post


Link to post
Share on other sites

I just saw an error like this.  Norton 360 had a bad reputation status for the ImXCF.Command.exe file and had quarantined it.  when I restored the .exe file from quarantine it then allowed me to open the file.

 

We all know sometimes there are false positives.

 

But I'm not happy with the error message. Are you sure you got this one? There should be a better indication that the executable is not available.

Share this post


Link to post
Share on other sites
JaykeBird    0

Greetings!

 

I'm using Paint.NET 4.0.5 and my friend uses the latest version of GIMP. Whenever I try to open the XCF files he sends me, I always get an error, the stack trace is below. I believed it was working when I was using an older version of Paint.NET, so the plugin just has to be updated or something.

System.InvalidCastException: Specified cast is not valid.
   at PaintDotNet.Serialization.SerializationFallbackBinder.BindToType(String assemblyName, String typeName) in d:\src\pdn\paintdotnet\src\Base\Serialization\SerializationFallbackBinder.cs:line 135
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Bind(String assemblyString, String typeString)
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, IMethodCallMessage methodCallMessage)
   at PaintDotNet.Document.FromStream(Stream stream) in d:\src\pdn\paintdotnet\src\Data\Document.cs:line 1438
   at XcfFileTypes.ImXcfFileType.XcfOnLoad(Stream input, Int32 variant)
   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

I can send some of the files he sends me if you'd like to see.

Share this post


Link to post
Share on other sites
Goonfella    214

Just tried out this plugin and got this when I tried opening a Gimp file -

 

System.InvalidCastException: Specified cast is not valid.

   at PaintDotNet.Serialization.SerializationFallbackBinder.BindToType(String assemblyName, String typeName) in d:\src\pdn\paintdotnet\src\Base\Serialization\SerializationFallbackBinder.cs:line 132

   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Bind(String assemblyString, String typeString)

   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)

   at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)

   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)

   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()

   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)

   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)

   at PaintDotNet.Document.FromStream(Stream stream) in d:\src\pdn\paintdotnet\src\Data\Document.cs:line 1438

   at XcfFileTypes.ImXcfFileType.XcfOnLoad(Stream input, Int32 variant)

   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

 

 

I am running the latest version of PDN and Gimp 2.8.10 on Windows 8.1

Share this post


Link to post
Share on other sites
Goonfella    214

Would love to help but I don`t know how to upload it. I have tried a PM but there does not seem to be an option to upload a file there, and I have tried attaching the file to this post without any luck.

 

(all these years and I still can`t use the forum properly! :roll: )

Share this post


Link to post
Share on other sites

Got an example from Goonfela, thanks.

There seems to be a general issue in 4.05 using the current version of the plugin or older ones. Plugin works fine in 3.5.11 and 4.0.1.

There will not be a fix this year ;-)

Share this post


Link to post
Share on other sites
Pixey    1,947

FYI for @Goonfella.

 

Hit More Reply Options in the thread and this window should open for you to browse to where your image, or file, is located.

 

(Ignore point 4 - this is an old example)

th_Adding%20attachments%20for%20PB_zpsix

Edited by Pixey

Share this post


Link to post
Share on other sites
Goonfella    214

I tried this Pixey but the little progress circle just carried on going on and on without finishing the upload. Maybe it`s my bloody potato internet to blame then.

 

Martin, thanks for checking this out. Guess I will just have to wait for the update. :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now