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
Encode Operation #6
Conversation
# possible error likely here to return palette kwarg | ||
octreequantisation!(img1; kwargs...) | ||
return img1 | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems perfectly a case that can be implemented in a separate standalone package so that other packages (e.g., DitherPunk) can benefit from it.
cc: @adrhill
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this would be very useful and I'd be very interested in contributing to (or writing) such a package. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small discussion on slack: because this package along with the other two https://github.com/ashwani-rathee/ExifViewer.jl and https://github.com/ashwani-rathee/JPEG2000.jl are part of GSoC 22', we'll quickly get this PR merged and then task switch to JPEG2000. So these quantization methods will be temporarily kept private to GIFImages.
Just opened an issue so that we don't forget this #7
This is almost done for now, I'll merge this after few more checks and fixes tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If x86 persists to be an issue, we can skip it (but leave an issue to notify potential users about this situation). Since it doesn't block this PR, I didn't check the tree quantisation part, but it does look like a lot of places can be optimized (keyword: reducing memory allocation).
Just ensure that we're using IO safely -- always have a close operation for each open operation.
Currently we are merging this to move forward with JPEG2000 task, quantizer are mostly optmized(have spent quite a bit of time on them already), albeit more time could be spent later. |
This intends to solve the encoding operation for the gif file in Julia
After first commit, it's no good for us
Quantization, Unique functions are slow, might need to write quantization algorithm that return quantized image and colormap used. or something useful can be found in ImageSegmentation.jl. Makes sense to use staticarrays.
Some improvements in allocations after 2, use of inplace methods and removal of redundant functions helps :
But quantization and unique alone contribute 11 ms to gif_encode.