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

Properly expose image conversion options #32

Merged
merged 4 commits into from
Dec 29, 2022

Conversation

Cellivar
Copy link
Owner

Turns out I forgot to do this. This is a breaking change.

This moves the image dithering options directly into the image options object that can be passed to addImageFromImageData, the idea being the consumer of the library can alter the conversion options to suit their needs depending on their printer's shenanigans.

This also alters the default gray cutoff down to 25% instead of 75%, mostly to see if that improves things.

@github-actions
Copy link

Code coverage

Filename Statements Branches Functions Lines
src/Documents/BitmapGRF.ts 53.28% 44.83% 68.75% 55.37%
src/WebZlpError.ts 33.33% 100% 0% 33.33%
src/index.ts 100% 100% 100% 100%
src/Documents/Commands.ts 37.5% 43.33% 7.59% 37.36%
src/Printers/Configuration/PrinterOptions.ts 28.95% 66.67% 7.14% 28.95%
src/Printers/Models/PrinterModel.ts 42.86% 22.22% 6.67% 42.86%
src/Printers/Configuration/SerialPortSettings.ts 100% 100% 100% 100%
src/Printers/Configuration/MediaOptions.ts 70.77% 35.71% 71.43% 70.77%
src/Documents/ConfigDocument.ts 37.5% 0% 33.33% 37.5%
src/Documents/Document.ts 50% 0% 33.33% 55%
src/Documents/LabelDocument.ts 52% 66.67% 25% 52%
src/Documents/ReadyToPrintDocuments.ts 31.82% 100% 0% 33.33%
src/Printers/Communication/LineBreakTransformer.ts 12.5% 100% 0% 14.29%
src/Printers/Communication/PrinterCommunication.ts 84.62% 66.67% 66.67% 84.62%
src/Printers/Communication/UsbPrinterDeviceChannel.ts 7.04% 0% 0% 7.04%
src/Printers/Languages/EplPrinterCommandSet.ts 14.29% 8.47% 9.68% 14.97%
src/Printers/Models/PrinterModelDb.ts 18.52% 0% 0% 18.52%
src/Printers/Models/EplPrinterModels.ts 46.15% 100% 0% 46.15%
src/Printers/Languages/PrinterCommandSet.ts 22.45% 6.25% 12% 23.16%
src/Printers/PrinterCommunicationOptions.ts 25% 100% 100% 25%
src/Printers/Printer.ts 11.43% 0% 0% 11.54%
src/Printers/Languages/ZplPrinterCommandSet.ts 4.35% 0% 0% 4.38%
src/PrinterUsbManager.ts 6.52% 0% 0% 6.82%

@Cellivar Cellivar merged commit 0b6572d into main Dec 29, 2022
@Cellivar Cellivar deleted the feature/expose-image-conversion-config branch December 29, 2022 13:13
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

Successfully merging this pull request may close these issues.

1 participant