Skip to content

Commit

Permalink
WebPShop 0.4.3
Browse files Browse the repository at this point in the history
Fix the Preview applying the color profile with no ICC on Windows.
  • Loading branch information
y-guyon committed Apr 1, 2022
1 parent ea40a3d commit 075215f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# WebP file format plug-in for Photoshop

Current plug-in version: WebPShop 0.4.2
Current plug-in version: WebPShop 0.4.3

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

Download the binary at https://github.com/webmproject/WebPShop/releases. \
Direct link for Windows x64:
https://github.com/webmproject/WebPShop/releases/download/v0.4.2/WebPShop_0_4_2_Win_x64.8bi \
https://github.com/webmproject/WebPShop/releases/download/v0.4.3/WebPShop_0_4_3_Win_x64.8bi \
Direct link for MacOS (extract the ZIP archive afterwise):
https://github.com/webmproject/WebPShop/releases/download/v0.4.2/WebPShop_0_4_2_Mac_Universal.zip \
Move the plug-in (the .8bi binary for Windows or the .plugin folder for MacOS)
Expand Down Expand Up @@ -80,8 +80,8 @@ The radio buttons offer several levels of compression effort:
* On some images, lossless compression might produce smaller file sizes than
lossy. That's why the quality slider is not linear. The same problem exists
with the radio buttons controlling the compression effort.
* The color profile is always applied to the Preview image on Windows and
never applied on macOS, regardless of the related checkbox state.
* The color profile is not applied to the Preview image on macOS, regardless
of the related checkbox state.
* This plug-in does not extend `Export As` neither `Save for Web`.
* Encoding and decoding are done in a single pass. It is not currently
possible to cancel such actions, and it might take some time on big images.
Expand Down
7 changes: 7 additions & 0 deletions docs/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,10 @@
* Built with Microsoft Visual Studio Community 2019 16.11.10.
* Tested on Windows Server 2016 Datacenter with Photoshop 2022
(v 23.2.0) x64, Release.

- 2022/04/01: v0.4.3

* Fixed the Preview applying the color profile with no ICC on Windows.
* Built with Microsoft Visual Studio Community 2019 16.11.10.
* Tested on Windows Server 2016 Datacenter with Photoshop 2022
(v 23.2.2) x64, Release.
4 changes: 2 additions & 2 deletions mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>8BIF</string>
<key>CFBundleShortVersionString</key>
<string>0.4.2</string>
<string>0.4.3</string>
<key>CFBundleSignature</key>
<string>8BIM</string>
<key>CFBundleVersion</key>
<string>0.4.2</string>
<string>0.4.3</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2018-2020 Google LLC</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion mac/WebPShopUI_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void DoAboutBox(SPPluginRef plugin_ref) {

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

Expand Down
2 changes: 1 addition & 1 deletion mac/webpshop.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@
INSTALL_PATH = "$(HOME)/Library/Bundles";
LIBRARY_SEARCH_PATHS = "../libwebp-1.2.1-mac-10.15/lib";
MACOSX_DEPLOYMENT_TARGET = 10.15;
MARKETING_VERSION = 0.4.2;
MARKETING_VERSION = 0.4.3;
OTHER_LDFLAGS = "-v";
PLUGIN_TYPE = 8BIF;
PRODUCT_BUNDLE_IDENTIFIER = com.google.WebPShop;
Expand Down
2 changes: 1 addition & 1 deletion win/WebPShop.rc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ FONT 8, "MS Shell Dlg"
BEGIN
DEFPUSHBUTTON "OK",1,171,7,11,14,NOT WS_VISIBLE | WS_DISABLED
PUSHBUTTON "Cancel",2,172,24,10,14,NOT WS_VISIBLE | WS_DISABLED
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
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
PUSHBUTTON "developers.google.com/speed/webp",10,10,60,180,20
END

Expand Down
11 changes: 8 additions & 3 deletions win/WebPShopUI_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ bool WebPShopDialog::DisplayImage(const ImageMemoryDesc& image,
return false;
}

PSPixelMap pixels;
PSPixelMask mask;
pixels.version = 1;
PSPixelMask mask = {};
PSPixelMap pixels = {};
pixels.version = 3;
pixels.bounds.left = 0;
pixels.bounds.right = image.width;
pixels.bounds.top = 0;
Expand All @@ -173,6 +173,11 @@ bool WebPShopDialog::DisplayImage(const ImageMemoryDesc& image,
pixels.masks = NULL;
pixels.maskPhaseRow = 0;
pixels.maskPhaseCol = 0;
pixels.pixelOverlays = NULL;
pixels.colorManagementOptions = write_config_.keep_color_profile
? kViewAsStandardRGB
: kViewAsUncompensated;
pixels.depth = image.pixels.depth;

if (image.num_channels == 4) {
mask.next = NULL;
Expand Down

0 comments on commit 075215f

Please # to comment.