Skip to content

Instantly share code, notes, and snippets.

@myfreeer
Last active September 15, 2017 06:18
Show Gist options
  • Save myfreeer/2263fbe9be8c58946357097373033e5d to your computer and use it in GitHub Desktop.
Save myfreeer/2263fbe9be8c58946357097373033e5d to your computer and use it in GitHub Desktop.
From ab8255b36ef03ba415b88a514bf52527cc11d563 Mon Sep 17 00:00:00 2001
From: myfreeer <[email protected]>
Date: Fri, 15 Sep 2017 09:17:33 +0800
Subject: [PATCH] webp: change default options
---
src/photoshop/WebP.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/photoshop/WebP.cpp b/src/photoshop/WebP.cpp
index 89461aa..17a7bf3 100755
--- a/src/photoshop/WebP.cpp
+++ b/src/photoshop/WebP.cpp
@@ -99,10 +99,10 @@ static void InitGlobals(Ptr globalPtr)
gInOptions.alpha = WEBP_ALPHA_TRANSPARENCY;
gInOptions.mult = FALSE;
- gOptions.quality = 50;
- gOptions.lossless = TRUE;
+ gOptions.quality = 100;
+ gOptions.lossless = FALSE;
gOptions.alpha = WEBP_ALPHA_TRANSPARENCY;
- gOptions.lossy_alpha = FALSE;
+ gOptions.lossy_alpha = TRUE;
gOptions.alpha_cleanup = TRUE;
gOptions.save_metadata = TRUE;
}
--
2.14.1
From bbfe95e16ac2eef31650306aa065919123fe957e Mon Sep 17 00:00:00 2001
From: myfreeer <[email protected]>
Date: Fri, 15 Sep 2017 09:52:09 +0800
Subject: [PATCH] webp: change windows registry keys
---
src/photoshop/WebP_UI.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/photoshop/WebP_UI.h b/src/photoshop/WebP_UI.h
index d9aeaec..6d85924 100644
--- a/src/photoshop/WebP_UI.h
+++ b/src/photoshop/WebP_UI.h
@@ -99,7 +99,7 @@ WebP_About(
// Windows registry keys
-#define WEBP_PREFIX "Software\\fnord\\WebP"
+#define WEBP_PREFIX "Software\\Adobe\\Photoshop\\WebP"
#define WEBP_ALPHA_KEY "Alpha"
#define WEBP_MULT_KEY "Mult"
#define WEBP_AUTO_KEY "Auto"
--
2.14.1
7z a WebP_Photoshop.7z .\vc\vc9\UpgradeLog.htm
7z a WebP_Photoshop.7z .\vc\vc9\build\x64\Release\WebP.8bi
7z a WebP_Photoshop.7z .\vc\vc9\build\Win32\Release\WebP.8bi
appveyor PushArtifact WebP_Photoshop.7z
version: 1.0.{build}
configuration: Release
platform:
- x64
- Win32
install:
- cmd: >-
git submodule init
git submodule update --recursive --remote --merge
appveyor DownloadFile https://gist.github.com/myfreeer/2263fbe9be8c58946357097373033e5d/raw/AdobeWebM-before-build.bat
cache: ext\adobe_photoshop_cs5_sdk_win
before_build:
- cmd: AdobeWebM-before-build.bat
build:
project: vc\vc9\WebP.sln
verbosity: minimal
after_build:
- cmd: AdobeWebM-after-build.bat
test: off
appveyor DownloadFile https://gist.github.com/myfreeer/2263fbe9be8c58946357097373033e5d/raw/AdobeWebM-0001-webp-change-default-options.patch
appveyor DownloadFile https://gist.github.com/myfreeer/2263fbe9be8c58946357097373033e5d/raw/AdobeWebM-0002-webp-change-windows-registry-keys.patch
appveyor DownloadFile https://gist.github.com/myfreeer/2263fbe9be8c58946357097373033e5d/raw/AdobeWebM-patch.sh
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec ./AdobeWebM-patch.sh"
appveyor DownloadFile https://gist.github.com/myfreeer/2263fbe9be8c58946357097373033e5d/raw/AdobeWebM-after-build.bat
rem call "%VS140COMNTOOLS%VsDevCmd.bat"
rem vcupgrade "vc\vc9\WebP.sln" -overwrite
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv" "vc\vc9\WebP.sln" /upgrade
if not exist ext\adobe_photoshop_cs5_sdk_win\pluginsdk\samplecode\common\sources\DialogUtilitiesWin.cpp (
appveyor DownloadFile http://download.macromedia.com/pub/developer/photoshop/sdk/adobe_photoshop_sdk_cc_2017_win.zip
md ext\adobe_photoshop_cs5_sdk_win
7z x adobe_photoshop_sdk_cc_2017_win.zip -oext\adobe_photoshop_cs5_sdk_win
)
git submodule init
git submodule update --recursive --remote --merge
appveyor DownloadFile https://gist.github.com/myfreeer/2263fbe9be8c58946357097373033e5d/raw/AdobeWebM-before-build.bat
appveyor DownloadFile https://gist.github.com/myfreeer/2263fbe9be8c58946357097373033e5d/raw/AdobeWebM-after-build.bat
#!/bin/bash
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git am AdobeWebM-*.patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment