4Q-s-r-o / signature

Flutter plugin that creates a canvas for writing down a signature
MIT License
255 stars 85 forks source link

toPngBytes() always return 400x500 px image #71

Closed antiv closed 2 years ago

antiv commented 2 years ago

Hi,

after upgrading to 5.2.1 all my signatures are saved as 400x500px and cannot be resized.

I find this part of code:

//WIDTH AND HEIGHT IS OPTIONAL. IMAGE WILL BE CENTERED
 final ui.Image? image = await toImage(height: 500, width: 400);

How can I use toPngBytes() to get an image in the proper size, based on image data? In old version that part works fine.

alexlovar commented 2 years ago

Hi, did you find a solution?

antiv commented 2 years ago

HI, not really. I switched back to the old version

MartinHlavna commented 2 years ago

This is bug of course. It was intended to take defaultWidth and defaultHeight. Solution with optional parameters for toPngBytes is better though. Will be fixed soon.

MartinHlavna commented 2 years ago

Closing this ticket in favor of #68 since the root cause is same.