Skip to content

Commit

Permalink
Fix color palette of resized image
Browse files Browse the repository at this point in the history
It looks like Imagemagick messes up the palette when resizing an image.

In order to work around this, the routine now always reduces color when
resizing, even if the original palette was already correct.

Merge pull request #116 from haroldo-ok/fix-image-conversion
  • Loading branch information
haroldo-ok authored Nov 9, 2023
2 parents a08c14e + 0efbb16 commit ee643a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base/src/vn_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void VN_init() {
XGM_setForceDelayDMA(TRUE);

VDP_setTextPalette(TEXT_PAL);
VDP_drawText("choice4genesis v0.13.2", 17, 27);
VDP_drawText("choice4genesis v0.14.3", 17, 27);
}


Expand Down
2 changes: 1 addition & 1 deletion generator/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const convertImages = async (result, projectFolder, commandLine) => {
params = [...params, '-resize', '320x224!', '-quality', '100'];
}

if (!isCorrectPalette) {
if (!isCorrectPalette || !isCorrectSize) {
params = [...params, '-kmeans', '16'];
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "choice4genesis",
"version": "0.14.2",
"version": "0.14.3",
"description": "A ChoiceScript clone that generates SGDK-compatible C source for the Sega Genesis ",
"main": "index.js",
"targets": {
Expand Down

0 comments on commit ee643a9

Please sign in to comment.