Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout zigimg
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: zigimg
- name: Checkout test-suite fixtures
Expand All @@ -23,9 +23,9 @@ jobs:
repository: zigimg/test-suite
path: test-suite
- name: Setup Zig
uses: mlugg/setup-zig@v1
uses: mlugg/setup-zig@v2
with:
version: 0.14.0-dev.2577+271452d22
version: 0.14.1
- name: AST Verify
run: zig fmt --check --ast-check src/
working-directory: zigimg
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ This is a work in progress library to create, process, read and write different

## Install & Build

This library uses zig nominated [2024.11.0-mach](https://machengine.org/about/nominated-zig/). To install using [`zigup`](https://github.com/marler8997/zigup):

```sh
zigup 0.14.0-dev.2577+271452d22
```
This library currently uses zig [0.14.1](https://ziglang.org/download/), we do plan to go back to using mach nominated zig until a newer version than 0.14.1 will be nominated.

### Use zigimg in your project

Expand Down
4 changes: 3 additions & 1 deletion build.zig.zon
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.{
.name = "zigimg",
.name = .zigimg,
.fingerprint = 0x6d2b443cdaa8f7f3,
.minimum_zig_version = "0.14.1",
.version = "0.1.0",
.paths = .{""},
}
6 changes: 3 additions & 3 deletions src/formats/png/reader.zig
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ pub const ReaderProcessor = struct {
const ptr_info = @typeInfo(Ptr);

std.debug.assert(ptr_info == .pointer); // Must be a pointer
std.debug.assert(ptr_info.pointer.size == .One); // Must be a single-item pointer
std.debug.assert(ptr_info.pointer.size == .one); // Must be a single-item pointer

const gen = struct {
fn chunkProcessor(ptr: *anyopaque, data: *ChunkProcessData) ImageUnmanaged.ReadError!PixelFormat {
Expand Down Expand Up @@ -773,7 +773,7 @@ pub const TrnsProcessor = struct {
};
var pixel_pos: u32 = 0;
// work around broken saturating arithmetic on wasm https://github.com/llvm/llvm-project/issues/58557
const isWasm = comptime @import("builtin").target.isWasm();
const isWasm = comptime @import("builtin").target.cpu.arch.isWasm();
switch (self.trns_data) {
.gray => |gray_alpha| {
switch (data.src_format) {
Expand Down Expand Up @@ -983,7 +983,7 @@ pub fn CustomReaderOptions2(Processor1: type, Processor2: type) type {

const root = @import("root");

pub const NoopAllocator = Allocator.VTable{ .alloc = undefined, .free = undefined, .resize = undefined };
pub const NoopAllocator = Allocator.VTable{ .alloc = undefined, .free = undefined, .resize = undefined, .remap = undefined };

/// Applications can override this by defining DefaultPngOptions struct in their root source file.
/// We would like to use FixedBufferAllocator with memory from stack here since we should be able
Expand Down