Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert elligible PSD files to OpenRaster format #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Convert elligible PSD files to OpenRaster format #1

wants to merge 1 commit into from

Conversation

alexgleason
Copy link

I think that .ora is a better format to distribute this artwork in than PSD wherever possible. ora (OpenRaster) is a libre interchange format that is easy to implement and is supported by a number of digital image programs like GIMP and Krita.

I wrote a script (using Krita) to convert all the .psd files in the WT directory into .ora format:

#!/bin/bash

find . -name *.psd | while read line; do
    echo "Converting $line to OpenRaster."
    out="${line%.*}.ora"
    krita "$line" --export --export-filename "$out"
done

Most of the files converted seamlessly with no issues. Here's the full log:

Converting ./Orc Fortress/Orc Fortress.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Sudden Donations/New Things.psd to OpenRaster.

Converting ./Forgiving Vampire/Forgiving Vampire.psd to OpenRaster.

Converting ./Elven Forest/Elven Forest.psd to OpenRaster.

Converting ./Recycling Resources/Recycling Resources.psd to OpenRaster.

Converting ./unity/Unity.psd to OpenRaster.

Converting ./Merfolk Oracle/Merfolk Oracle.psd to OpenRaster.

Converting ./Goblin Climber/Goblin Climber.psd to OpenRaster.

Converting ./Merfolk Diviner/Merfolk Diviner.psd to OpenRaster.

Converting ./Elf Male Caster/Elf Male Caster.psd to OpenRaster.

Converting ./Majestic Griffin/Majestic Griffin.psd to OpenRaster.

Converting ./Kolibri/Kolibri.psd to OpenRaster.

Converting ./Foot Soldier/Foot Soldier.psd to OpenRaster.

Converting ./Elven Ballista/Elven Ballista.psd to OpenRaster.

Converting ./Merfolk Rider/Merfolk Rider.psd to OpenRaster.

Converting ./Centaur Staff/Centaur Staff.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Dryads Flute/Dryads Flute.psd to OpenRaster.

Converting ./Helm Of The Cyclops/Helm Of The Cyclops.psd to OpenRaster.

Converting ./Natures Outrage/Natures Outrage.psd to OpenRaster.

Converting ./Band Of Brothers/Band Of Brothers.psd to OpenRaster.

Converting ./Hidden Realm/Hidden Realm.psd to OpenRaster.

Converting ./Wight/Wight.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Elven Bag/Elven Bag.psd to OpenRaster.

Converting ./Human City/Human City.psd to OpenRaster.

Converting ./Squad Leader/Squad Leader.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Human Fighter/Human Fighter.psd to OpenRaster.

Converting ./Potion Botttle/Potion Botttle.psd to OpenRaster.

Converting ./Sequoia Saplings/Sequoia Saplings.psd to OpenRaster.

Converting ./Female Elf Caster/Female Elf Caster.psd to OpenRaster.

Converting ./Potion Making/Potion Making.psd to OpenRaster.

Converting ./Merfolk Female Noble/Merfolk Female Noble.psd to OpenRaster.

Converting ./Eternal Protection/Eternal protection .psd to OpenRaster.

Converting ./Botanic Block/Botanic Block.psd to OpenRaster.

Converting ./Siphon/Siphon.psd to OpenRaster.

Converting ./Human Male Fighter/Human Male Fighter.psd to OpenRaster.

Converting ./Barbarian Dwarf/Barbarian Dwarf.psd to OpenRaster.

Converting ./Female Fire Mage/Female Fire Mage.psd to OpenRaster.

Converting ./Conscript/Conscript.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./cyclops/Cyclops.psd to OpenRaster.

Converting ./Sneaking Orcs/Sneaking Orcs.psd to OpenRaster.

Converting ./Clockwork/Clockwork.psd to OpenRaster.

Converting ./Nourished Flower/Nourished Flower.psd to OpenRaster.

Converting ./Orc Drummer/Orc Drummer.psd to OpenRaster.

Converting ./Shapeshift/Shapeshift.psd to OpenRaster.

Converting ./Poison Ivy/Poison Ivy.psd to OpenRaster.

Converting ./Outmaneuvered/Outmaneuvered.psd to OpenRaster.

Converting ./Sneaking Elven Scout/Sneaking Elven Scout.psd to OpenRaster.

Converting ./Nun/Nun.psd to OpenRaster.

Converting ./Early Spring/Early Spring.psd to OpenRaster.

Converting ./Centaur Hunter/Centaur Hunter.psd to OpenRaster.

Converting ./Together We Stand/Together We Stand.psd to OpenRaster.

Converting ./Goblin Against The Wind/Goblin Against The Wind.psd to OpenRaster.

Converting ./Strategic Defense/Strategic Defense.psd to OpenRaster.

Converting ./Nirvana Of The Undead/Nirvana Of The Undead.psd to OpenRaster.

Converting ./Rope Trap/Rope Trap.psd to OpenRaster.

Converting ./karma/Karma.psd to OpenRaster.

Converting ./Guard/Guard.psd to OpenRaster.

Converting ./Elven Trackers/Elven Trackers.psd to OpenRaster.

Converting ./Flying Ship/Flying Ship.psd to OpenRaster.

Converting ./Elven Coat/Elven Coat.psd to OpenRaster.

Converting ./Merman Armor/Merman Armor.psd to OpenRaster.

Converting ./Nightbird Bow/Nightbird Bow.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Falconer/Falconer.psd to OpenRaster.

Converting ./Elven Arrows/Elven Arrows.psd to OpenRaster.

Converting ./Unshackled/Unshackled.psd to OpenRaster.

Converting ./First Strike/First Strike.psd to OpenRaster.

Converting ./Botanist/Botanist.psd to OpenRaster.

Converting ./Mentor/Mentor.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Battering Ram/Battering Ram.psd to OpenRaster.

Converting ./Cutpurse Imp/Cutpurse Imp.psd to OpenRaster.

Converting ./Second Sons Army Camp/Second Sons Army Camp.psd to OpenRaster.

Converting ./Capture/Capture.psd to OpenRaster.

Converting ./Smith/Smith.psd to OpenRaster.

Converting ./Wild Warg/Wild Warg.psd to OpenRaster.

Converting ./Satyr/Satyr.psd to OpenRaster.

Converting ./Goblin Scrap Gatherer/Goblin Scrap Gatherer.psd to OpenRaster.

Converting ./Bracer Of The Octopus/Bracer Of The Octopus.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!
KisLsOverlayFilter::applyOverlay(): Pattern scaling is NOT implemented!

Converting ./Spearman/Spearman.psd to OpenRaster.

Converting ./Small Potion/Small Potion.psd to OpenRaster.

Converting ./Elven Camp/Elven Camp.psd to OpenRaster.

Converting ./Elf Child/Elf Child.psd to OpenRaster.

Converting ./Deadly Shock/Deadly Shock.psd to OpenRaster.

Converting ./Medical Attention/Medical Attention.psd to OpenRaster.

Converting ./Elven Sword/Elven Sword.psd to OpenRaster.

Converting ./Confused Orc/Confused Orc.psd to OpenRaster.

Converting ./Heavy Load/Heavy Load.psd to OpenRaster.

Converting ./Orc Shaman/Orc Shaman.psd to OpenRaster.

Converting ./Magical Gear/Magical Gear.psd to OpenRaster.

Converting ./Babies/Babies.psd to OpenRaster.

Converting ./Sitting Elf/Sitting Elf.psd to OpenRaster.

Converting ./VultureAssassin/VultureAssassin.psd to OpenRaster.

Converting ./Horn/Horn.psd to OpenRaster.

Converting ./Elven Food/Elven Food.psd to OpenRaster.

Converting ./Jump/Jump.psd to OpenRaster.

Converting ./Female Kisses/Female Kisses.psd to OpenRaster.
WARNING: layerInfoSectionSize is NOT even! Fixing...

Converting ./Siege/Siege.psd to OpenRaster.

Converting ./Identity Crisis/Identity Crisis.psd to OpenRaster.

Converting ./Flying Fortress/Flying Fortress.psd to OpenRaster.

Converting ./Goblin Sacred Place/Goblin Sacred Place.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Kelp Forest/Kelp Forest.psd to OpenRaster.

Converting ./Crumbling Tower/Crumbling Tower.psd to OpenRaster.

Converting ./Bilocation/Bilocation.psd to OpenRaster.

Converting ./Medusa/Medusa.psd to OpenRaster.

Converting ./Elven Justice/Elven Justice.psd to OpenRaster.

Converting ./Ancestral Spirit Tree/Ancestral Spirit Tree.psd to OpenRaster.

Converting ./Innkeeper/Innkeeper.psd to OpenRaster.

Converting ./Mercenary/Mercenary.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Ink Cloud/Ink Cloud.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Swampy Moat/Swampy Moat.psd to OpenRaster.

Converting ./Lobotomized Library/Lobotomized Library.psd to OpenRaster.

Converting ./Human Female Fighter/Human Female Fighter.psd to OpenRaster.

Converting ./Erode/Erode.psd to OpenRaster.

Converting ./Magic Portal/Magic Portal.psd to OpenRaster.

Converting ./Nightingale/Nightingale.psd to OpenRaster.

Converting ./Whirlwind/Whirlwind.psd to OpenRaster.

Converting ./Fire Wizard Female/Fire Wizard Female.psd to OpenRaster.
convertAndSetBlendMode: Curve conversion is not implemented yet
convertAndSetBlendMode: Curve conversion is not implemented yet
convertAndSetBlendMode: Curve conversion is not implemented yet

Converting ./Recon Orcs/Recon Orcs.psd to OpenRaster.

Converting ./Orc Battle Frenzy/Orc Battle Frenzy.psd to OpenRaster.

Converting ./Moving Piece/Moving Piece.psd to OpenRaster.

These 12 files did have issues:

  • ./Orc Fortress/Orc Fortress.psd
  • ./Centaur Staff/Centaur Staff.psd
  • ./Wight/Wight.psd
  • ./Squad Leader/Squad Leader.psd
  • ./Conscript/Conscript.psd
  • ./Nightbird Bow/Nightbird Bow.psd
  • ./Mentor/Mentor.psd
  • ./Bracer Of The Octopus/Bracer Of The Octopus.psd
  • ./Goblin Sacred Place/Goblin Sacred Place.psd
  • ./Mercenary/Mercenary.psd
  • ./Ink Cloud/Ink Cloud.psd
  • ./Fire Wizard Female/Fire Wizard Female.psd

The issues all seemed related to the fact that they use Photoshop blend modes which are not compatible with free software like GIMP or Krita. Even with .xcf or .kra I could not convert these files accurately. Therefore, I left these 12 files as .PSD format for now.

So, I only converted the files to .ora where full support exists, and I left the unsupported files as psd for now.

@ngoeminne
Copy link
Member

Hi Alex,

Thanks for the effort, however I'd like to keep the psd files as well (for now).
We should make them both available (psd + ora), and we should check if the 12 non convertible files could be converted by hand (eg. remove the feature that's causing the failure). What worries me is that most of the non-convertable files are some of the latest Santi has made.

@alexgleason
Copy link
Author

No worries, I'll check them back out and amend this commit.

@alexgleason
Copy link
Author

Okay, I've pushed an amended commit to this branch. My PR now has all previous PSD files along with OpenRaster conversions.

and we should check if the 12 non convertible files could be converted by hand (eg. remove the feature that's causing the failure)

It's worth noting that the files do end up being converted, there is just loss of quality or features. For example, here's Wight.png

PNG rendered from Photoshop (provided by Santi)

wight

GIMP

Now here's Wight.psd as it appears in GIMP (or when converted to OpenRaster):

wight psd

The purple effect on the smoke in its hands is gone.

GIMP has no support for layer styles whatsoever. This is what that layer looks like in GIMP:

screenshot from 2018-05-08 12 18 50

Krita

Krita does support layer styles. When opening the PSD in Krita, it looks like this:

wight psd krita

screenshot from 2018-05-08 12 21 34
screenshot from 2018-05-08 12 25 23

As you can see, the effect is visible, but it's messed up. However, I noticed that setting choke to 100% mostly fixes the problem.

screenshot from 2018-05-08 12 26 23

wight psd krita-edit

That said, it is still not exactly the same. 😕 I think if we decide to do this, we should update the PNG version so at least it can be generated by the file.

Also, importantly, neither xcf nor ora supports this. In this case, we would have to distribute the kra, which is Krita's file format. It's quite similar to OpenRaster but it's not widely supported (GIMP can't open it, for instance, but GIMP also doesn't support layer styles) and not ideal as an interchange format for the same reason xcf isn't. Still better than PSD in my opinion, because at least you can open the kra with Krita (free/libre software) and it looks right, while you cannot with the PSD. I'd be fine distributing .kra files in places where OpenRaster doesn't work. Hopefully the OpenRaster spec will catch up to kra over time.

Thoughts?

What worries me is that most of the non-convertable files are some of the latest Santi has made.

I'm not convinced this is relevant yet. Layer styles have been around since at least Photoshop 6 (2000) so it's probably a coincidence that Santi has been recently utilizing them.

I will investigate the other documents and see where the incompatibilities lie.

@alexgleason
Copy link
Author

alexgleason commented May 8, 2018

Writing up my findings a bit more.

Using this command (stackoverflow) I can diff two PNGs to compare them.

compare image1 image2 -compose src diff.png

So, I have Band Of Brothers.ora and Band Of Brothers.png. I'll convert the OpenRaster to a PNG then compare them.

First off, I tried exporting ORA to PNG with GIMP, and the PNG output was very different than the Photoshop PNG.

bob-gimp-diff

Red pixels mean there is a change between the two versions. Ignore the faint image in the background, it's there only for reference.

At first I was really scared. Did converting to OpenRaster totally fuck up the images? No. I exported the OpenRaster to PNG with Krita instead, and diff'd them again. Here's the output of that.

bob-diff

This looks much better.

Moral of the story: do not use GIMP to export PNG, use Krita. At least for GIMP 2.8. The problem, it seems, is that GIMP samples the hidden background layer when rendering semi-transparent pixels. Krita properly ignores it.


Next, we can use this on the files with errors.

Here's *Orc Fortress*, which gave the error: `convertAndSetBlendMode: Curve conversion is not implemented yet`

![orc-diff](https://user-images.githubusercontent.com/3639540/39772505-73ffcd78-52c3-11e8-8fe3-e121adac4fd2.png)

If you look closely, there are some very small red dots.

![screenshot from 2018-05-08 13 27 19](https://user-images.githubusercontent.com/3639540/39772542-8daef88e-52c3-11e8-9eaf-4da6f1b15860.png)

I actually have no clue what's causing this. The two images look identical to the naked eye, so I'm not concerned at all about these pixels. I think we can safely adopt the OpenRaster file for this one.

On *Centaur Staff* there's something wrong with the lettering:

![staff-diff](https://user-images.githubusercontent.com/3639540/39772947-8e7b7c82-52c4-11e8-995d-3aacde617c6b.png)

Comparing the images side-by-side you can see it's clearly the beveling (original version is on the right):

![screenshot from 2018-05-08 13 35 03](https://user-images.githubusercontent.com/3639540/39772988-b02dd352-52c4-11e8-9749-3a24d4471ff4.png)

The original version has a **Bevel and Emboss** layer style which is removed in the ora. Like with Wight, Krita will render it (for a kra file), but it's all messed up and needs to be adjusted.

Here's Krita doing an ugly job at rendering the layer style:

![screenshot from 2018-05-08 13 40 31](https://user-images.githubusercontent.com/3639540/39773243-6e2ac978-52c5-11e8-9f06-b44df6cdc45e.png)

I might do more later, but my hunch is that most of these problems will be issues with layer styles.

Some of these files we'll be able to convert and forget it, but some we'll have to adjust the layer styles in Krita and then provide a .kra, I think.

@ngoeminne
Copy link
Member

ngoeminne commented May 10, 2018 via email

@DreadKnight
Copy link

ora format would be nice indeed. Krita is really amazing and proprietary stuff like PS/psd needs to be avoided as much as possible (if not forgotten, but I'm being idealistic here).

Been trying to download the whole repo as a zip but that failed me a few times, so I had to clone it (which is way more nerdy), so if including psd source files along with ora, it would get way larger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants