imageproc icon indicating copy to clipboard operation
imageproc copied to clipboard

fix draw text with alpha

Open var4yn opened this issue 5 months ago • 5 comments

My pull request about problem.

Added the HAS_ALPHA: bool associated constant to the Pixel trait. I want to update the current has_alpha check in the draw_text_mut() func to use Pixel::HAS_ALPHA once it becomes available.

This requires updating the minimum Rust version to 1.81.0. and the rayon crate version to 1.10.0.

var4yn avatar Jul 26 '25 10:07 var4yn

I don't know how to fix the safety/miri errors. The problem is caused by inexact calculations.

var4yn avatar Jul 26 '25 10:07 var4yn

I don't know how to fix the safety/miri errors. The problem is caused by inexact calculations.

Yeah, it's not your fault. Probably related to the recent nightly update.

cospectrum avatar Aug 10 '25 17:08 cospectrum

@cospectrum Can I make changes? I can recreate the PR. There are a lot of unnecessary commits here due to my inexperience 😭

var4yn avatar Oct 31 '25 04:10 var4yn

Const HAS_ALPHA: bool was added in image 0.25.8. Now if we update the dependencies for imageproc, I can make my code with the bugfix more correct

var4yn avatar Oct 31 '25 04:10 var4yn

Soon I will have a release with the image version set to 0.25.0. So maybe let’s merge the PR after that? I will tag you

cospectrum avatar Oct 31 '25 07:10 cospectrum