Skip to content

Commit 075215f

Browse files
committed
WebPShop 0.4.3
Fix the Preview applying the color profile with no ICC on Windows.
1 parent ea40a3d commit 075215f

File tree

7 files changed

+24
-12
lines changed

7 files changed

+24
-12
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# WebP file format plug-in for Photoshop
22

3-
Current plug-in version: WebPShop 0.4.2
3+
Current plug-in version: WebPShop 0.4.3
44

55
WebPShop is a Photoshop module for opening and saving WebP images, including
66
animations.
@@ -17,7 +17,7 @@ using the contents of this repository or contributing.
1717

1818
Download the binary at https://github.com/webmproject/WebPShop/releases. \
1919
Direct link for Windows x64:
20-
https://github.com/webmproject/WebPShop/releases/download/v0.4.2/WebPShop_0_4_2_Win_x64.8bi \
20+
https://github.com/webmproject/WebPShop/releases/download/v0.4.3/WebPShop_0_4_3_Win_x64.8bi \
2121
Direct link for MacOS (extract the ZIP archive afterwise):
2222
https://github.com/webmproject/WebPShop/releases/download/v0.4.2/WebPShop_0_4_2_Mac_Universal.zip \
2323
Move the plug-in (the .8bi binary for Windows or the .plugin folder for MacOS)
@@ -80,8 +80,8 @@ The radio buttons offer several levels of compression effort:
8080
* On some images, lossless compression might produce smaller file sizes than
8181
lossy. That's why the quality slider is not linear. The same problem exists
8282
with the radio buttons controlling the compression effort.
83-
* The color profile is always applied to the Preview image on Windows and
84-
never applied on macOS, regardless of the related checkbox state.
83+
* The color profile is not applied to the Preview image on macOS, regardless
84+
of the related checkbox state.
8585
* This plug-in does not extend `Export As` neither `Save for Web`.
8686
* Encoding and decoding are done in a single pass. It is not currently
8787
possible to cancel such actions, and it might take some time on big images.

docs/NEWS.md

+7
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,10 @@
9090
* Built with Microsoft Visual Studio Community 2019 16.11.10.
9191
* Tested on Windows Server 2016 Datacenter with Photoshop 2022
9292
(v 23.2.0) x64, Release.
93+
94+
- 2022/04/01: v0.4.3
95+
96+
* Fixed the Preview applying the color profile with no ICC on Windows.
97+
* Built with Microsoft Visual Studio Community 2019 16.11.10.
98+
* Tested on Windows Server 2016 Datacenter with Photoshop 2022
99+
(v 23.2.2) x64, Release.

mac/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<key>CFBundlePackageType</key>
1818
<string>8BIF</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>0.4.2</string>
20+
<string>0.4.3</string>
2121
<key>CFBundleSignature</key>
2222
<string>8BIM</string>
2323
<key>CFBundleVersion</key>
24-
<string>0.4.2</string>
24+
<string>0.4.3</string>
2525
<key>NSHumanReadableCopyright</key>
2626
<string>Copyright 2018-2020 Google LLC</string>
2727
</dict>

mac/WebPShopUI_mac.mm

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void DoAboutBox(SPPluginRef plugin_ref) {
298298

299299
[alert setMessageText:@"About WebPShop"];
300300
[alert setInformativeText:
301-
@"WebPShop 0.4.2\nWebP 1.2.2\nA Photoshop plug-in for reading "
301+
@"WebPShop 0.4.3\nWebP 1.2.2\nA Photoshop plug-in for reading "
302302
@"and writing WebP files.\nCopyright 2019-2022 Google LLC."];
303303
[alert setAlertStyle:NSAlertStyleInformational];
304304

mac/webpshop.xcodeproj/project.pbxproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@
524524
INSTALL_PATH = "$(HOME)/Library/Bundles";
525525
LIBRARY_SEARCH_PATHS = "../libwebp-1.2.1-mac-10.15/lib";
526526
MACOSX_DEPLOYMENT_TARGET = 10.15;
527-
MARKETING_VERSION = 0.4.2;
527+
MARKETING_VERSION = 0.4.3;
528528
OTHER_LDFLAGS = "-v";
529529
PLUGIN_TYPE = 8BIF;
530530
PRODUCT_BUNDLE_IDENTIFIER = com.google.WebPShop;

win/WebPShop.rc

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ FONT 8, "MS Shell Dlg"
102102
BEGIN
103103
DEFPUSHBUTTON "OK",1,171,7,11,14,NOT WS_VISIBLE | WS_DISABLED
104104
PUSHBUTTON "Cancel",2,172,24,10,14,NOT WS_VISIBLE | WS_DISABLED
105-
LTEXT "WebPShop 0.4.2\nWebP 1.2.2\nA Photoshop plug-in for reading and writing WebP files.\nCopyright 2019-2022 Google LLC.",5,10,10,180,50
105+
LTEXT "WebPShop 0.4.3\nWebP 1.2.2\nA Photoshop plug-in for reading and writing WebP files.\nCopyright 2019-2022 Google LLC.",5,10,10,180,50
106106
PUSHBUTTON "developers.google.com/speed/webp",10,10,60,180,20
107107
END
108108

win/WebPShopUI_windows.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ bool WebPShopDialog::DisplayImage(const ImageMemoryDesc& image,
156156
return false;
157157
}
158158

159-
PSPixelMap pixels;
160-
PSPixelMask mask;
161-
pixels.version = 1;
159+
PSPixelMask mask = {};
160+
PSPixelMap pixels = {};
161+
pixels.version = 3;
162162
pixels.bounds.left = 0;
163163
pixels.bounds.right = image.width;
164164
pixels.bounds.top = 0;
@@ -173,6 +173,11 @@ bool WebPShopDialog::DisplayImage(const ImageMemoryDesc& image,
173173
pixels.masks = NULL;
174174
pixels.maskPhaseRow = 0;
175175
pixels.maskPhaseCol = 0;
176+
pixels.pixelOverlays = NULL;
177+
pixels.colorManagementOptions = write_config_.keep_color_profile
178+
? kViewAsStandardRGB
179+
: kViewAsUncompensated;
180+
pixels.depth = image.pixels.depth;
176181

177182
if (image.num_channels == 4) {
178183
mask.next = NULL;

0 commit comments

Comments
 (0)