Fix out-of-order reads in flip
This commit is contained in:
parent
a2493bcc0a
commit
6511abb20a
1 changed files with 1 additions and 3 deletions
|
@ -16,11 +16,9 @@ Napi::Value Flip(const Napi::CallbackInfo &info) {
|
||||||
obj.Has("flop") ? obj.Get("flop").As<Napi::Boolean>().Value() : false;
|
obj.Has("flop") ? obj.Get("flop").As<Napi::Boolean>().Value() : false;
|
||||||
string type = obj.Get("type").As<Napi::String>().Utf8Value();
|
string type = obj.Get("type").As<Napi::String>().Utf8Value();
|
||||||
|
|
||||||
VOption *options = VImage::option()->set("access", "sequential");
|
|
||||||
|
|
||||||
VImage in =
|
VImage in =
|
||||||
VImage::new_from_buffer(data.Data(), data.Length(), "",
|
VImage::new_from_buffer(data.Data(), data.Length(), "",
|
||||||
type == "gif" ? options->set("n", -1) : options)
|
type == "gif" ? VImage::option()->set("n", -1)->set("access", "sequential") : 0)
|
||||||
.colourspace(VIPS_INTERPRETATION_sRGB);
|
.colourspace(VIPS_INTERPRETATION_sRGB);
|
||||||
if (!in.has_alpha()) in = in.bandjoin(255);
|
if (!in.has_alpha()) in = in.bandjoin(255);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue