mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
README: correct advanced decode api pseudo-code
Change-Id: I09e5365cc15cb9b6c53a1d5d4e16a51bfc353b10
This commit is contained in:
parent
6a32a0f5bf
commit
206b686b39
4
README
4
README
@ -382,7 +382,7 @@ an otherwise too-large picture. Some CPU can be saved too, incidentally.
|
||||
CHECK(WebPGetFeatures(data, data_size, &config.input) == VP8_STATUS_OK);
|
||||
|
||||
// C) Adjust 'config' options, if needed
|
||||
config.no_fancy = 1;
|
||||
config.options.no_fancy_upsampling = 1;
|
||||
config.options.use_scaling = 1;
|
||||
config.options.scaled_width = scaledWidth();
|
||||
config.options.scaled_height = scaledHeight();
|
||||
@ -394,7 +394,7 @@ an otherwise too-large picture. Some CPU can be saved too, incidentally.
|
||||
// Optionally, the config.output can be pointed to an external buffer as
|
||||
// well for decoding the image. This externally supplied memory buffer
|
||||
// should be big enough to store the decoded picture.
|
||||
config.output.u.BGRA.rgba = (uint8_t*) memory_buffer;
|
||||
config.output.u.RGBA.rgba = (uint8_t*) memory_buffer;
|
||||
config.output.u.RGBA.stride = scanline_stride;
|
||||
config.output.u.RGBA.size = total_size_of_the_memory_buffer;
|
||||
config.output.is_external_memory = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user