Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Image Package Updates

The changelog on the image package is pretty vague, and I am going through my code to update to the most recent version, but I am having trouble understanding what is what now. Two functions in particular I am having trouble migrating to the newest version and they are the old drawImage function and the copyInto function. For example

//this took in two images, and overlayed the first one of the second one
//Draw the image src onto the image dst.

drawImage(Img1, Img2)

//Copies a rectangular portion of one image to another image. dst is the destination image, src is the source image identifier. 
//In other words, copyInto will take an rectangular area from src of width srcw and height srch at position (srcx,srcy) and place it in a rectangular area of dst of width dstw and height dsth at position (dstx,dsty).

copyInto(Img1, Img2, dstY: int, dst: int, blend: true)

I believe drawImage is now compositeImage, but it isn't clear. I cannot find a direct replacement of copyInto in the newest docs. Is there one?

like image 652
Dennis Ashford Avatar asked Oct 15 '25 02:10

Dennis Ashford


1 Answers

This will help you.

compositeImage(fullMergeImage, image, dstY: pos);
like image 164
jazzbpn Avatar answered Oct 17 '25 18:10

jazzbpn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!