Closed SerggioC closed 3 years ago
No @SerggioC,
Is this reproducible? Can you share the piece of code ?
Hi, This only happened once as it's reported by Firebase Crashlytics, this never occured in my tests. Can't find out why the stacktrace refers Random and IntStream...
I have this code to print images:
RasterBitImageWrapper imageWrapper = new RasterBitImageWrapper();
Bitonal algorithm = new BitonalOrderedDither();
EscPosImage escposImage = new EscPosImage(new CoffeeImageAndroidImpl(bitmap), algorithm);
escposCoffeePrinter.write(imageWrapper, escposImage);
is this on android?
Yes it's on andoid.
ok, I've reproduced it wright now on desenv / with api 19 kitkat. and api 21 too I don't know why yet but it can work with threshold, an simplier algorithm
// Bitonal algorithm = new BitonalThreshold();
Bitonal algorithm = new BitonalOrderedDither();
I don't know the min api sdk version to espos-coffee work properly, need to test! but 19 kitkat can work with this caveats (BitonalOrderedDither();)
change
Bitonal algorithm = new BitonalOrderedDither();
by this
Bitonal algorithm = new BitonalThreshold();
Great catch! I will try the change.
As I see in the sample, using BitonalThreshold the resulted printed image will be smaller with "compacted" pixels right? Is that the only difference? I'm on min SDK 19 for the project.
Thank you.
good, 19 is ok for me! the difference between threshold and ordered diter is that with the ordered BitonalOrderedDither, the image printed have a grey-scale sensation for whom is seeing, and threshold algo print a image in black-white (more traditional way). But the size of printing is the same.
I will focus on discover exactly witch android api/sdk min version is necessary for escpos-lib (next activities).
hi @SerggioC the newest release v4.0.3 is now offering BitonalOrderedDither on api level 19.
[], Marco
Thanks @anastaciocintra. I'll update the version. Until now, after changing to BitonalThreshold, I didn't see any more crashes. Issue can be closed maybe.
I dont know what kind of issue this should be in or why is it happening, but here it is. I got this crash report on crashlytics log from BitonalOrderedDither:
Any ideas what is?
Thank you!