tiny.png.Encoding
Defined in tiny.png.
API (7)
Actions
Public operations.
Types and contracts
Public types and contracts.
Fields and members
Public fields and members.
Source
Source: lib/png/src/encode/encoder.zig:17
zig
pub const Encoding = struct { storage: Storage, bytes: []const u8, pub const InitError = Storage.InitError || Error; pub fn init(allocator: std.mem.Allocator, image: ImageView) InitError!Encoding { return initWithBounds(allocator, image, try Bounds.exact(image)); } pub fn initWithBounds( allocator: std.mem.Allocator, image: ImageView, bounds: Bounds, ) InitError!Encoding { var scratch: Scratch = undefined; var storage = try Storage.init(allocator, .{ .image = image, .bounds = bounds, .scratch = &scratch, }); errdefer storage.deinit(allocator); storage.activate(); const bytes = try bytesFromImage(&storage, image); return .{ .storage = storage, .bytes = bytes }; } pub fn status(self: *const Encoding) Status { return self.storage.status(); } pub fn deinit(self: *Encoding, allocator: std.mem.Allocator) void { self.storage.reset(); self.storage.deinit(allocator); self.* = undefined; }};Source: lib/png/src/root.zig:22
zig
pub const Encoding = encode.Encoding;Also reachable as
Audit
| Definitions | 6 |
|---|---|
| Public names | 12 |
| Members | 2 |
| Version | 26.7.0 |
| Revision | daab053ee433 |