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

Skip to content

Conversation

@mlarouche
Copy link
Collaborator

The migration to Zig 0.15 introduced many breaking changes to I/O API that required many changes to several functions. Since everything is breaking, I made the decision to switch Image and ImageUnmanaged around like ArrayList in 0.15 standard library. Now Image does not keep the allocator around, you'll need to use Image.Managed for that. The image editor is also now exposed via Image.Editor.

Buffer is required when reading or writing to files. You can use zigimg.io.DEFAULT_BUFFER_SIZE if you are unsure which buffer size to use.

If you used the image format directly, you'll need to use the new zigimg.io.ReadStream and zigimg.io.WriteStream that manage seeking for file or memory sources and will give you a pointer to std.Io.Reader or std.Io.Writer.

Closes #289

…th memory and file, add start of the test to read from a file.
* Remove buffered file from ReadStream and WriteStream, having an internal buffer cause too many issues, just bite the bullet and always require to pass a read or write buffer
* Ported LZW to new IO API
* Make the GIF test suite fails if any test does not pass
* Imported and adapted BitReader and BitWriter from an older zig standard library
… allocate SubImage separately from the array list, fix high-color test, now the whole GIF test suite passes!
…s commented out and will be fixed in next commit
… peek into 99% of the format and TGA will seek back itself
…ache size and use that in ChunkWriter and deflate compressor.

* Add PngWriter to put the writing functions inside a struct with the writer and the buffers
@mlarouche mlarouche merged commit 362cdd6 into master Sep 22, 2025
6 checks passed
@mlarouche mlarouche deleted the migration-to-zig-0.15 branch September 22, 2025 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration to zig 0.15.1

2 participants