progmem / Switch-Fightstick

Proof-of-Concept LUFA Project for the Nintendo Switch. Uses reverse-engineering of the Pokken Tournament Pro Pad for the Wii U and Switch System v3.0.0
MIT License
447 stars 470 forks source link

Splatoon 2 Printer help with GIMP #2

Closed BlinkyStitt closed 7 years ago

BlinkyStitt commented 7 years ago

Hello! I just saw that you have pulled @shinyquagsire23's printer code into a branch here. I've merged in your fixes into my fork (https://github.com/WyseNynja/Splatoon-2-Drawing/).

However, I'm having trouble figuring out how to create/export the images with GIMP. Can you explain how?

I'd love to collaborate on this with you.

progmem commented 7 years ago

I haven't actually tested the GIMP export process; give me a second to install GIMP and I can go through the steps on it. I'm using a Mac, so things may differ a bit (it should all be built off the same project, so I'm not expecting too many difference). I'd be more than happy to help with it, though!

progmem commented 7 years ago

So as a heads-up, ShinyQuagsire mentioned on Twitter that the image is a 320x120 resolution image. That's information that's missing in all of our branches, so we need to get that documented somewhere.

progmem commented 7 years ago

Alright, so the steps that I have here on OSX:

  1. Obtain an image, through some means, that is 320x120. Photoshop to GIMP or using GIMP only, eventually you want just a 320x120 canvas.
  2. Go to Image > Mode > Indexed...
  3. Select "Use black and white (1-bit) palette". Feel free to do dithering at this point if you need to. You should end up with a black and white image.
  4. Go to File > Export. When exporting, select "Raw image data (*.data)". Save your image wherever is most convenient. Leave RGB type as "Standard" and the indexed palette type as "R, G, B".

As a heads-up, you can go in the reverse direction with ShinyQuagsire's image. Do an export following the above steps first and note the location of the "palette" file:

  1. Go to File > Open and select the "ironic.data".
  2. Set Width and Height to 320x120, and the Image Type to "Indexed".
  3. Select the palette file as noted above, then click "Open".

This gives me an inverted version of ShinyQuagsire's original image, so that may be an important step to keep in mind; his image most likely indexed black first, then white. My test image is a gradient with white in the upper-left corner and black in the bottom right, so white would most likely index first in my test case. I would say a good step to perform would be 'if the upper-left pixel is white, invert the image first'.

BlinkyStitt commented 7 years ago

Thank you! I'll tinker with this later.

EDIT: https://github.com/WyseNynja/Splatoon-2-Drawing/commit/e14cd31b58c095f8f23495ce484cd4c3185ec570

progmem commented 7 years ago

Awesome, glad to hear that was able to help!

I'm going to go ahead and close this pull request; this repository ultimately isn't focused on the Splatoon 2 post printer, but more on a general HID implementation for the Nintendo Switch.