Skip to content

Commit 21bdd76

Browse files
committed
release: 3.6.1
2 parents 7af7ce0 + ff2fd6e commit 21bdd76

12 files changed

Lines changed: 135 additions & 136 deletions

File tree

CREDITS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Project Dependencies
22
Package: flaca
3-
Version: 3.6.0
3+
Version: 3.6.1
44
Target: x86_64-unknown-linux-gnu
5-
Generated: 2026-03-21 21:58:03 UTC
5+
Generated: 2026-03-23 01:50:08 UTC
66

77
| Package | Version | Author(s) | License |
88
| ---- | ---- | ---- | ---- |
@@ -29,7 +29,7 @@
2929
| [fastrand](https://github.com/smol-rs/fastrand) | 2.3.0 | [Stjepan Glavina](mailto:stjepang@gmail.com) | Apache-2.0 OR MIT |
3030
| [filetime](https://github.com/alexcrichton/filetime) | 0.2.27 | [Alex Crichton](mailto:alex@alexcrichton.com) | MIT OR Apache-2.0 |
3131
| [find-msvc-tools](https://github.com/rust-lang/cc-rs) ⚒️ | 0.1.9 | | MIT OR Apache-2.0 |
32-
| **flapfli** | 3.6.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
32+
| **flapfli** | 3.6.1 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
3333
| [**flume**](https://github.com/zesterer/flume) | 0.12.0 | [Joshua Barretto](mailto:joshua.s.barretto@gmail.com) | Apache-2.0 OR MIT |
3434
| [funty](https://github.com/myrrlyn/funty) | 2.0.0 | [myrrlyn](mailto:self@myrrlyn.dev) | MIT |
3535
| [fyi_ansi](https://github.com/Blobfolio/fyi) | 2.5.0 | [Josh Stoik](mailto:josh@blobfolio.com) | WTFPL |
@@ -48,7 +48,7 @@
4848
| [libloading](https://github.com/nagisa/rust_libloading/) ⚒️ | 0.8.9 | [Simonas Kazlauskas](mailto:libloading@kazlauskas.me) | ISC |
4949
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | 0.12.1 | [Dan Gohman](mailto:dev@sunfishcode.online) | Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
5050
| [lock_api](https://github.com/Amanieu/parking_lot) | 0.4.14 | [Amanieu d'Antras](mailto:amanieu@gmail.com) | MIT OR Apache-2.0 |
51-
| [**lodepng**](https://github.com/lvandeve/lodepng) | 2026.1.2 | Lode Vandevenne | Zlib |
51+
| [**lodepng**](https://github.com/lvandeve/lodepng) | 2026.1.19 | Lode Vandevenne | Zlib |
5252
| [log](https://github.com/rust-lang/log) | 0.4.29 | The Rust Project Developers | MIT OR Apache-2.0 |
5353
| [memchr](https://github.com/BurntSushi/memchr) ⚒️ | 2.8.0 | [Andrew Gallant](mailto:jamslam@gmail.com) and bluss | Unlicense OR MIT |
5454
| [minimal-lexical](https://github.com/Alexhuszagh/minimal-lexical) ⚒️ | 0.2.1 | [Alex Huszagh](mailto:ahuszagh@gmail.com) | MIT OR Apache-2.0 |

flaca/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flaca"
3-
version = "3.6.0"
3+
version = "3.6.1"
44
license = "WTFPL"
55
authors = ["Josh Stoik <josh@blobfolio.com>"]
66
edition = "2024"
@@ -61,7 +61,7 @@ description = "Ignore symlinks (rather than following them)."
6161

6262
[[package.metadata.bashman.switches]]
6363
long = "--preserve-meta"
64-
description = "(Try to) preserve EXIF, etc., metadata from source JPEG and PNG files. (Does *not* work for GIFs!)"
64+
description = "(Try to) preserve JPEG and PNG image metadata, at the cost of larger output sizes. GIF metadata is not currently supported."
6565

6666
[[package.metadata.bashman.switches]]
6767
long = "--preserve-times"
@@ -130,7 +130,7 @@ items = [
130130

131131
[[package.metadata.bashman.credits]]
132132
name = "lodepng"
133-
version = "2026.1.2"
133+
version = "2026.1.19"
134134
license = "Zlib"
135135
authors = [ "Lode Vandevenne" ]
136136
repository = "https://github.com/lvandeve/lodepng"

flaca/src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const HELP: &str = concat!(r"
4040
USAGE:", ansi!((dim, violet) "
4141
-------------------------------------------------------------------------------"), "
4242
flaca [FLAGS] [OPTIONS] <PATH(S)>...
43-
4443
", ansi!((dim, violet) "
4544
-------------------------------------------------------------------------------"), "
4645
FLAGS:", ansi!((dim, violet) "
@@ -55,8 +54,9 @@ FLAGS:", ansi!((dim, violet) "
5554
----------------------------------------------------"), "
5655
--no-symlinks Ignore symlinks (rather than following them).", ansi!((dim, violet) "
5756
----------------------------------------------------"), "
58-
--preserve-meta (Try to) preserve EXIF, etc., metadata from source
59-
JPEG and PNG files. (Does *not* work for GIFs!)", ansi!((dim, violet) "
57+
--preserve-meta (Try to) preserve JPEG and PNG image metadata, at
58+
the cost of larger output sizes. GIF metadata is not
59+
currently supported.", ansi!((dim, violet) "
6060
----------------------------------------------------"), "
6161
--preserve-times (Try to) preserve the original file access and
6262
modification times when resaving an image.", ansi!((dim, violet) "

flaca/src/img/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub(super) fn encode(file: &Path, settings: Settings)
5050
check_resolution(ImageKind::Png, &raw, settings)?;
5151

5252
encode_oxipng(&mut raw, settings.preserve_meta());
53-
if settings.zopfli() { encode_zopflipng(&mut raw, settings.preserve_meta()); }
53+
if settings.zopfli() { encode_zopflipng(&mut raw); }
5454
}
5555
// Do JPEG stuff?
5656
else if ImageKind::is_jpeg(&raw) {
@@ -331,8 +331,8 @@ fn encode_oxipng(raw: &mut Vec<u8>, preserve_meta: bool) {
331331
/// ```bash
332332
/// zopflipng -m
333333
/// ```
334-
fn encode_zopflipng(raw: &mut Vec<u8>, preserve_meta: bool) {
335-
if let Some(new) = flapfli::optimize(raw, preserve_meta) {
334+
fn encode_zopflipng(raw: &mut Vec<u8>) {
335+
if let Some(new) = flapfli::optimize(raw) {
336336
let slice: &[u8] = &new;
337337
if slice.len() < raw.len() && ImageKind::is_png(slice) {
338338
raw.truncate(slice.len());

flaca/src/opts.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,5 +148,7 @@ impl Settings {
148148

149149
#[must_use]
150150
/// # Zopfli Pass?
151-
pub(crate) const fn zopfli(self) -> bool { self.zopfli }
151+
pub(crate) const fn zopfli(self) -> bool {
152+
! self.preserve_meta && self.zopfli
153+
}
152154
}

flapfli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flapfli"
3-
version = "3.6.0"
3+
version = "3.6.1"
44
license = "WTFPL"
55
authors = ["Josh Stoik <josh@blobfolio.com>"]
66
edition = "2024"

flapfli/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn build_ffi() {
8080
lodepng_src.join("lodepng.c"),
8181
])
8282
.define("LODEPNG_NO_COMPILE_ALLOCATORS", None)
83-
//.define("LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS", None)
83+
.define("LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS", None)
8484
.define("LODEPNG_NO_COMPILE_CPP", None)
8585
.define("LODEPNG_NO_COMPILE_CRC", None)
8686
.define("LODEPNG_NO_COMPILE_DISK", None)
@@ -185,7 +185,7 @@ fn bindings(lodepng_src: &Path) {
185185
bindgen::Builder::default()
186186
.clang_args([
187187
"-DLODEPNG_NO_COMPILE_ALLOCATORS",
188-
//"-DLODEPNG_NO_COMPILE_ANCILLARY_CHUNKS",
188+
"-DLODEPNG_NO_COMPILE_ANCILLARY_CHUNKS",
189189
"-DLODEPNG_NO_COMPILE_CPP",
190190
"-DLODEPNG_NO_COMPILE_CRC",
191191
"-DLODEPNG_NO_COMPILE_DISK",

flapfli/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,9 @@ use zopflipng::{
8686
///
8787
/// Note: 16-bit transformations are not lossless; such images will have their
8888
/// bit depths reduced to a more typical 8 bits.
89-
pub fn optimize(src: &[u8], preserve_meta: bool) -> Option<EncodedPNG> {
89+
pub fn optimize(src: &[u8]) -> Option<EncodedPNG> {
9090
// Start by decoding the source.
9191
let mut dec = LodePNGState::default();
92-
if preserve_meta { dec.preserve_metadata(); }
9392
let img = dec.decode(src)?;
9493

9594
// Find the right strategy.

flapfli/src/lodepng.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,6 @@ impl LodePNGState {
225225
Some(enc)
226226
}
227227

228-
#[inline]
229-
/// # Preserve Metadata.
230-
pub(super) const fn preserve_metadata(&mut self) {
231-
self.decoder.remember_unknown_chunks = 1;
232-
}
233-
234228
/// # Change Strategies.
235229
pub(super) const fn set_strategy(&mut self, strategy: LodePNGFilterStrategy) {
236230
self.encoder.filter_strategy = strategy;

release/man/flaca.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.TH "FLACA" "1" "March 2026" "flaca v3.6.0" "User Commands"
1+
.TH "FLACA" "1" "March 2026" "flaca v3.6.1" "User Commands"
22
.SH NAME
3-
FLACA \- Manual page for flaca v3.6.0.
3+
FLACA \- Manual page for flaca v3.6.1.
44
.SH DESCRIPTION
55
Brute\-force, lossless GIF, JPEG, and PNG compression.
66
.SS USAGE:
@@ -24,7 +24,7 @@ Skip PNG images.
2424
Ignore symlinks (rather than following them).
2525
.TP
2626
\fB\-\-preserve\-meta\fR
27-
(Try to) preserve EXIF, etc., metadata from source JPEG and PNG files. (Does *not* work for GIFs!)
27+
(Try to) preserve JPEG and PNG image metadata, at the cost of larger output sizes. GIF metadata is not currently supported.
2828
.TP
2929
\fB\-\-preserve\-times\fR
3030
(Try to) preserve the original file access and modification times when resaving an image.

0 commit comments

Comments
 (0)