Author Topic: X-Piratez image conversion tool  (Read 4891 times)

Offline holoc

  • Squaddie
  • *
  • Posts: 5
    • View Profile
X-Piratez image conversion tool
« on: November 24, 2017, 02:48:48 pm »
Short story: I had 400+ hand made image files for ufopedia in a mod, but my HDD has died and my ass was torn into pieces, I am releasing the tool and forgetting about it. There is also an attachment with 80 saved images. Feel free to use.

Q: What is does?
A: Convertes images to x-pirates palette with one click, palette is being made according to this guide https://openxcom.org/forum/index.php/topic,4957 by Meridian.

Q: How to use?
A:
• You will need irfanview, this script uses irfanview as palette extraction tool. Get irfanview here http://www.irfanview.com/ don't use x64 version, it has issues.
• Then you need to drop image converter into irfanview folder.
• Next you need to prepare image files, you can use literally any image editor for that, irfanview would work too, but i strongly recommend photoshop with its powerful and flexible index palette options. YOU NEED TO DECREASE COLOR DEPTH TO 233 COLORS. Any other in range 1-256 would work too(any 8bpp image), but any other number would lead to some loss of quality. (233 = 256 minus palette entries occupied by game for its needs)
• Next you either drag-n-drop image file on converter executable, or run the exe and choose file through dialog menu. It would do the rest by itself and would OVERWRITE the source image file.
• The converted files can be used in game with mods, check Meridian's guide on top. ↑

Q: How it works?
A: I have included both exe and source files in the archive. It is written in autoit(https://www.autoitscript.com/site/autoit/), the source has commentaries on every action, very easy to read and modify. There are online compilers for that language if you want to compile it by yourself but don't want to install autoit.
Small notice: I did not do any failchecks in the script, was not worth it. It means that if you click in wrong places or do something unexpected - it would throw errors at you. It won't corrupt your windows files or something like that though, don't worry about that.

I was not following the game developent, so idk whats the current situation with those images and palettes and etc, but the source of tool can be very easily modified, so if you find it useful - feel free to edit it and modify to your needs, I don't take any credit for that. It would literally take a couple of minutes to modify source script to any palette.

Spoiler EXAMPLES:

























GET FILES:
Just in case uploading everywhere. It is identical to attached archive.
http://rgho.st/7bRfKDjBZ
https://mega.nz/#!pTwHEZ5L!DZnYCnaYXLNC4yrm-L9FylaW7x5lEGRdIM4gKl2lEQU
https://myfile.org/Z577ded6be/X-Piratez_image_tool.zip
https://www.dropbox.com/s/wsadp50dfndzpzz/X-Piratez%20image%20tool.zip?dl=0
https://drive.google.com/open?id=1-v8xkPVUYaQN7P6qUuNAYliX6vH7aGT-

Spoiler Guide on image search engines:
If you would want to replace original game art with identical images, here is a small guide to help you.

First you need to install this addon to your browser(I've tried many different addons, this one seems to be the best):
• for Firefox: https://addons.mozilla.org/ru/firefox/addon/image-reverse-search/
• for Opera: https://addons.opera.com/ru/extensions/details/image-reverse-search/
• for Chrome: https://github.com/Brawl345/Image-Reverse-Search-WebExtension/releases
Next you upload the image you are going to search to some image hosting. I prefer https://imgur.com/ . It is better if the image hosting has simple interface with direct links to images. Give it a couple of seconds to upload, generate previews, etc.
Then right-click image, choose Reverse Image Search - Open all.

If you get any results - choose the best quality file and use you image editors to resize/cut it to required proportions.
It would not hurt to add a bit of extra sharpness and to oversaturate the image a bit, because converting to 233(256) colors would lead to color degradation.
Good luck.
« Last Edit: November 25, 2017, 06:09:09 am by holoc »

Offline Marza

  • Colonel
  • ****
  • Posts: 149
    • View Profile
Re: X-Piratez image convertion tool
« Reply #1 on: November 24, 2017, 08:35:27 pm »
I'll probably be making use of this. Thanks!

Offline ivandogovich

  • Commander
  • *****
  • Posts: 2381
  • X-Com Afficionado
    • View Profile
    • Ivan Dogovich Youtube
Re: X-Piratez image convertion tool
« Reply #2 on: November 24, 2017, 09:31:10 pm »
Agreed! Thanks a ton!

Offline Dioxine

  • Commander
  • *****
  • Posts: 5455
  • punk not dead
    • View Profile
    • Nocturnal Productions
Re: X-Piratez image conversion tool
« Reply #3 on: November 25, 2017, 06:53:04 pm »
Holy shit, great quality, how did you do that? Have you found original pictures for each on the internets? :)

Offline holoc

  • Squaddie
  • *
  • Posts: 5
    • View Profile
Re: X-Piratez image conversion tool
« Reply #4 on: November 26, 2017, 07:12:56 am »
Have you found original pictures for each on the internets? :)
Yes, there is a small guide under last spoiler in the first post.
Well I used photoshop a lot too, some small touches here and there make huge difference.

Spending around 10-15 minutes for one image, made around 400 images, which alltogether gives around 80 hours of editing. You can imagine my frustration when all this was lost. I can't force myself to redo all that again.