Skip to content
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

RangeError: Invalid value: Not in inclusive range when calling imageRaster #39

Open
YellowTreeGood opened this issue Apr 15, 2024 · 1 comment

Comments

@YellowTreeGood
Copy link

YellowTreeGood commented Apr 15, 2024

Hello,

d.zip

With some images, calling imageRaster causes a RangeError. I have attached an image that causes such error.
The following is the stack trace of the error.

RangeError: Invalid value: Not in inclusive range 0..5669: 5826 ...
#0 List.insertAll (dart:core-patch/growable_array.dart:44:7)
#1 Generator._toRasterFormat (package:flutter_esc_pos_utils/src/generator.dart:189:25)
#2 Generator.imageRaster (package:flutter_esc_pos_utils/src/generator.dart:656:38)
#3 F_BluetoothDevice.print (package:fmc_bms/fmc.dart:180:33)
#4 _F_PrintDialogueState.build.. (package:fmc_bms/common/ui/PrintingWidgets.dart:266:85)

Please have a look. Thank you.

@YellowTreeGood
Copy link
Author

The error only occurs for images whose width in pixels are not divisible by 8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant