Comments (5)
Let me explain what i did.
First, I followed the pngquant Installation instructions and installed Rust and Visual Studio 2019 on Windows 10.
Clone the msvc branch for Windows from the repository.
> git clone -b msvc --recursive https://github.com/kornelski/pngquant.git
Cloning into 'pngquant'...
remote: Enumerating objects: 4746, done.
remote: Counting objects: 100% (59/59), done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 4746 (delta 28), reused 38 (delta 16), pack-reused 4687
Receiving objects: 100% (4746/4746), 1.76 MiB | 2.80 MiB/s, done.
Resolving deltas: 100% (3121/3121), done.
Submodule 'lib' (https://github.com/ImageOptim/libimagequant.git) registered for path 'lib'
Cloning into 'C:/[censored]/pngquant/lib'...
remote: Enumerating objects: 4277, done.
remote: Counting objects: 100% (152/152), done.
remote: Compressing objects: 100% (87/87), done.
remote: Total 4277 (delta 75), reused 114 (delta 55), pack-reused 4125
Receiving objects: 100% (4277/4277), 898.74 KiB | 7.19 MiB/s, done.
Resolving deltas: 100% (2803/2803), done.
Submodule path 'lib': checked out 'f41ee301ff3a407b16991af3dbe03910919bbdc3'
Build.
> cd pngquant
> cargo build --release
Updating crates.io index
Compiling jobserver v0.1.24
Compiling pkg-config v0.3.22
Compiling dunce v1.0.2
Compiling vcpkg v0.2.15
Compiling libc v0.2.106
Compiling bytemuck v1.7.2
Compiling unicode-width v0.1.9
Compiling glob v0.3.0
Compiling bitflags v1.3.2
Compiling cc v1.0.71
Compiling rgb v0.8.29
Compiling getopts v0.2.21
Compiling wild v2.0.4
Compiling libz-sys v1.1.3
Compiling imagequant-sys v3.1.0+sys2.16.0 (C:\[censored]\pngquant\lib)
Compiling libpng-sys v1.1.8
Compiling lcms2-sys v3.1.9
Compiling pngquant v2.16.0 (C:\[censored]\pngquant)
warning: msvc-dist/ directory not present. MSVC builds may fail
Finished release [optimized] target(s) in 23.51s
The executable binary 2.16.0 is compiled. But, this had a issue #376 that have been fixed in 2.15.0.
\pngquant> target/release/pngquant.exe "イメージ.png"
error: cannot open 繧、繝。繝シ繧ク.png for reading
The file containing Japanese cannot be opened and the file name is garbled. why?
GustJc said,
// Inside static pngquant_error read_image
setlocale(LC_ALL, ".65001");
Although, b4d77c7 added setlocale() inside the main() function instead of the read_image() function.
In addition, it looks that the main() function is not compiled by the preprocessor.
#ifndef PNGQUANT_NO_MAIN
int main(int argc, char *argv[])
So setlocale() wasn't working. I don't understand the reason for doing this.
There is a compile switch in rust/build.rs
.
cc.define("PNGQUANT_NO_MAIN", Some("1"));
When I commented out this line, I got some compilation errors. I gave up fixing the error and undo the changes.
So, I added setlocale() inside the pngquant_main_internal() function (or read_image() function) as GustJc did. I don't know if this is really the right thing to do, but it seems to be working so far.
from pngquant.
Comrade, I build it! You can download here.
https://github.com/Guest126/pngquant/releases/tag/2.16.0-patch-1
from pngquant.
@kornelski Could you please address this? If it's a compilation problem, an earlier comment in this issue has a successfully completed compilation and the person who compiled it explains how it was accomplished.
I just noticed that you remarked elsewhere that you were now using ARM to compile and you've been having trouble. Why not rely on GitHub actions to build the binaries for you?
from pngquant.
Although I don't understand anything - thanks for detailed explanation, I will definitely use this.
However, I will keep this issue opened until the official download link will be updated. Sorry.
from pngquant.
Updated
from pngquant.
Related Issues (20)
- [Minor typo I think] https versus http links on the homepage at: https://pngquant.org/releases.html HOT 1
- Feat.req. Upload new releases to Github Releases tab
- pngquant vs. oxipng HOT 1
- [feature request] constraint colors from given palette HOT 1
- Cannot Open file for reading in Ubuntu 21.04 (64 Bit) HOT 2
- resouce file in tar break some automated build
- Possibility of adding liq_image_create_argb() HOT 1
- no matching package named `imagequant-sys` found HOT 2
- pngquant doesn't work inside Windows Docker containers HOT 6
- Input and output parameters HOT 2
- on windows pngquant directs output to stderr not stdout HOT 1
- Feature Request: Option to skip image if it already has 256 colors or less. HOT 2
- tar error while installing with brew on macos HOT 3
- OpenMP warning on Clang systems HOT 1
- Windows Build - Executing from current directory should include exclusion for pngquant.exe HOT 1
- Using more than 4 bits per channel with posterization HOT 3
- Is it possible to keep fully transparent (0 alpha) areas of image fully transparent? HOT 2
- Supported on Apple silicon? HOT 1
- Option to preserve color for fully transparent pixels HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pngquant.