mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-20 16:47:28 +01:00
Add base.PIXEL_FORMAT__ETC constants
This commit is contained in:
1 parent
983c5cd90e
commit
7e32336de0
10 files changed
+127
-46
No files matched your search
@@ -82,10 +82,8 @@ pub func decoder.decode_image_config?(dst: nptr base.image_config, src: base.io_
|
||||
this.frame_config_io_position = args.src.position()
|
||||
|
||||
if args.dst <> nullptr {
|
||||
// TODO: a Wuffs (not just C) name for the
|
||||
// WUFFS_BASE__PIXEL_FORMAT__INDEXED__BGRA_BINARY magic pixfmt constant.
|
||||
args.dst.set!(
|
||||
pixfmt: 0x8304_0008,
|
||||
pixfmt: base.PIXEL_FORMAT__INDEXED__BGRA_BINARY,
|
||||
pixsub: 0,
|
||||
width: this.width,
|
||||
height: this.height,
|
||||
@@ -149,12 +147,10 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
|
||||
return base."@end of data"
|
||||
}
|
||||
|
||||
// TODO: a Wuffs (not just C) name for the
|
||||
// WUFFS_BASE__PIXEL_FORMAT__Y magic pixfmt constant.
|
||||
status = this.swizzler.prepare!(
|
||||
dst_pixfmt: args.dst.pixel_format(),
|
||||
dst_palette: args.dst.palette(),
|
||||
src_pixfmt: this.util.make_pixel_format(repr: 0x2000_0008),
|
||||
src_pixfmt: this.util.make_pixel_format(repr: base.PIXEL_FORMAT__Y),
|
||||
src_palette: this.util.empty_slice_u8(),
|
||||
blend: args.blend)
|
||||
if not status.is_ok() {
|
||||
|
||||
Reference in new issue
Block a user