-
Notifications
You must be signed in to change notification settings - Fork 122
Migration to zig 0.15 #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…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
* Make PNG writer works again
… 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
…zigimg Image.Editor
…to follow new Zig standard library convension
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
ImageandImageUnmanagedaround likeArrayListin 0.15 standard library. NowImagedoes not keep the allocator around, you'll need to useImage.Managedfor that. The image editor is also now exposed viaImage.Editor.Buffer is required when reading or writing to files. You can use
zigimg.io.DEFAULT_BUFFER_SIZEif you are unsure which buffer size to use.If you used the image format directly, you'll need to use the new
zigimg.io.ReadStreamandzigimg.io.WriteStreamthat manage seeking for file or memory sources and will give you a pointer tostd.Io.Readerorstd.Io.Writer.Closes #289