mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
Add option to convert embedded ICC profiles
Set an bimg.Options OutputICC to an absolute path to the desired output ICC profile. If an embedded ICC profile is found in VipsImage, it is converted to the output ICC profile. Fixes #50
This commit is contained in:
parent
ce7bbda0f5
commit
767bfdac74
4 changed files with 22 additions and 1 deletions
6
vips.h
6
vips.h
|
|
@ -260,6 +260,12 @@ vips_colourspace_bridge(VipsImage *in, VipsImage **out, VipsInterpretation space
|
|||
return vips_colourspace(in, out, space, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
vips_icc_transform_bridge (VipsImage *in, VipsImage **out, const char *output_icc_profile) {
|
||||
// `output_icc_profile` represents the absolute path to the output ICC profile file
|
||||
return vips_icc_transform(in, out, output_icc_profile, "embedded", TRUE, NULL);
|
||||
}
|
||||
|
||||
int
|
||||
vips_jpegsave_bridge(VipsImage *in, void **buf, size_t *len, int strip, int quality, int interlace) {
|
||||
return vips_jpegsave_buffer(in, buf, len,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue