In the right place at the right time

Log-in or register.

In the right place at the right time

Published by on August 5th 2011.

When you click on the "New raster image" wizard in Paint.COM 2009.1, a nasty window pops up asking you all kinds of useless questions. Why should you care about transparency mode, layers, or the .rli format? WTF? Your rage is justified, I am to blame for this. The situation has been improving during the last two years as seen in other RW apps and I am close to a satisfactory solution.

The first thing that disappeared was the popup window - it was replaced by a side panel with the most important settings (image size, background color, and resolution). This was the easier part.

Finding the right file format

This was a bigger problem. There are many standard image formats with various capabilities and then there is the internal .rli format that can handle layers and styles. Add to the mix the semi-standard formats of Photoshop and GIMP with their layer support and it becomes a mess. The situation is even more complicated when choosing the right format for a cursor or an icon.

What is the right format for a new document? Should the type of an opened document change if the old format cannot handle the edits made in the editor (like when you add a frame to a .cur file or when you add a layer to a .jpg file)?

Currently, the rules that dictate what happens are hard-coded in various components of the application (though, you can configure your preferred single-layer image format).

In the upcoming version, the code that handles the automatic file format selection will be centralized (the same algorithm will apply to images, cursors, etc.) and there will be a new configuration page in the Application options.

rsrc/application-options-formats.png image

This window will allow you to choose your favorite file formats and order them by priority.

Let's assume the next Paint supports animations to make the situation more interesting. The screenshot shows 3 favorite formats: PNG, GIF and RLI.

If you create a new image, it starts are PNG. If you add a new frame, the type changes to GIF, because PNG is no longer capable of fully saving the document data (unless I implement animated PNGs). Now, if you add a new layer to the first frame, the format is changed to RLI, because GIF cannot save layers (assuming RLI is able to support animations).

On the other hand, if you open an existing image (or save a created one), the editor is much less willing to change the format of the image on its own. It no longer reacts to adding a new layer, but it would react to adding a new frame, because layers can be flattened on save, but animation frames would be lost.

What if you really like the RLI format and want all created images saved by default in that format? Then you simply remove the PNG and GIF format from the favorite list and it is done.

And what if you want to use the GIMP's .xcf format by default to be able to easily cooperate with friends, who use GIMP? Then you would need to add the GIMP format to the favorite list. You would put it above the RLI format to give it higher priority. If you put it above PNG, every new image would start as .xcf. If it is below PNG, an image will be turned into .xcf after you add second layer. The RLI format would still be used if you use layer styles in your image, because GIMP's format does not support layer styles. Well, unless you remove RLI from the favorite list. There are many options...

Is this confusing?

I guess it could be. Let me summarize the rules:

  • The format of an unsaved document is selected from the list of favorite formats in given order. The first format that is able to save as many aspects of the document as possible, is chosen.
  • For documents that exist on the hard drive, the format is only changed, when there is a severe change in the document data (for example when image is turned into an animation).

The formats left in the "Secondary formats" list are still fully usable and you can use them when saving a document, but you'll need to select them in the Save as... window.

Recent comments

user icon sixλxis forum moderator on August 5th 2011

R.I.P. Application Window...

user icon JDDellGuy contributing user on August 7th 2011

I like it. icon-image/5300-16x16x32.png image

user icon Anonymous
Vista & Win 7 icons
Select background
What about ICL files?
I wish there were...