Separate the Script and Image that Exports the Emote #12

Closed
opened 2019-08-14 03:46:10 +01:00 by Ghost · 2 comments
Ghost commented 2019-08-14 03:46:10 +01:00 (Migrated from codeberg.org)

We should separate the script and image that exports all the emotes in order to give it a cleaner configuration and make it more reusable toward other projects both internally and for public use.

Said project which just be a very small abstraction of ImageMagick which would make it easier to do bulk tasks like exporting a glob of images in various colors, sizes, and montages. This would also allow us to add more advance functionality which could help us speed up builds such as caching and storing hashes of each image, so we know what we need to do.

This would also clean some clutter out of this project as it's meant to be a simple emotes repo, yet is getting more and more code in it.

We should separate the script and image that exports all the emotes in order to give it a cleaner configuration and make it more reusable toward other projects both internally and for public use. Said project which just be a very small abstraction of ImageMagick which would make it easier to do bulk tasks like exporting a glob of images in various colors, sizes, and montages. This would also allow us to add more advance functionality which could help us speed up builds such as caching and storing hashes of each image, so we know what we need to do. This would also clean some clutter out of this project as it's meant to be a simple emotes repo, yet is getting more and more code in it.
Ghost commented 2019-08-14 04:04:03 +01:00 (Migrated from codeberg.org)

Possible example configuration:

input: "emotes/"
output: "output/"
masks:
 - name: modulate-mask
   input: "panda(.+).png"
   output: "../masks/panda$1Mask.png"
colors:
 - mask: modulate-mask
 - name: "src"
   prefix: ""
   modulate: "100,100,100"
 - name: "blue"
   prefix: "b"
   modulate: "100,100,0"
 - name: "green"
   prefix: "g"
   modulate: "100,100,166"
 - name: "pink"
   prefix: "p"
   modulate: "100,100,66.6"
 - name: "red"
   prefix: "r"
   modulate: "100,90,79"
 - name: "violet"
   prefix: "v"
   modulate: "100,70,50"
 - name: "yellow"
   prefix: "y"
   modulate: "100,115,115"
resolution:
  - forceAspectRatio: true
  - size: 512
  - size: 258
  - size: 128
  - size: 112
  - size: 72
  - size: 64
  - size: 56
  - size: 36
  - size: 28
montages:
  - name: "colors.png"
    glob: "*/128px/*pandaAww.png"
  - name: "emotes.png"
    glob: "src/128px/*"
checks:
  - sourceForMask: true
  - maskResolutionMatch: true
Possible example configuration: ```yml input: "emotes/" output: "output/" masks: - name: modulate-mask input: "panda(.+).png" output: "../masks/panda$1Mask.png" colors: - mask: modulate-mask - name: "src" prefix: "" modulate: "100,100,100" - name: "blue" prefix: "b" modulate: "100,100,0" - name: "green" prefix: "g" modulate: "100,100,166" - name: "pink" prefix: "p" modulate: "100,100,66.6" - name: "red" prefix: "r" modulate: "100,90,79" - name: "violet" prefix: "v" modulate: "100,70,50" - name: "yellow" prefix: "y" modulate: "100,115,115" resolution: - forceAspectRatio: true - size: 512 - size: 258 - size: 128 - size: 112 - size: 72 - size: 64 - size: 56 - size: 36 - size: 28 montages: - name: "colors.png" glob: "*/128px/*pandaAww.png" - name: "emotes.png" glob: "src/128px/*" checks: - sourceForMask: true - maskResolutionMatch: true ```
Ghost commented 2020-01-02 14:45:01 +00:00 (Migrated from codeberg.org)

This is a work in progress as the project named ImageCaster. Closing, since this repository is already using that project.

This is a work in progress as the project named ImageCaster. Closing, since this repository is already using that project.
Sign in to join this conversation.
No description provided.