减小生成的条形码图像的大小,而不会造成任何数据丢失. [英] Reduce the size of a generated barcode image without any dataloss.

查看:100
本文介绍了减小生成的条形码图像的大小,而不会造成任何数据丢失.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经为1300个字节的数据生成了条形码.

我的问题是:生成的条形码图像太大.
实际上,我必须在ID卡上打印生成的条形码.

请帮助我如何减小生成的条形码图像的大小而不会造成任何数据丢失.

谢谢与问候



我仅生成2D条码.

Hi All,

I have generated a barcode for 1300 bytes data.

My problem is: the generated barcode image size is too big.
Actually, I have to print the generated barcode on the ID card.

Please help me how to reduce the size of a generated barcode image without any dataloss.

Thanks&Regards



I''m generating 2D barcodes only.

推荐答案

可能无法.

条形码打印的尺寸和质量对可读性有显着影响,并且两者均在条形码规格文档中完全指定.在打印之前降低图像的质量可能会使其变得不可读或不可靠,并且减小打印尺寸(尤其是安静页边距)也可能会这样做.

为什么要这样做?
May not be possible.

Barcode printed size and quality has a marked effect on readability, and both are specified exactly in the barcode spec documents. Reducing the quality of an image before your print it may make it unreadable, or unreliably readable, and reducing the printed size (particularly the quiet margins) may well do the same.

Why do you want to do this?


考虑到条形码每位(可能)使用8个小节,因此总共有10400个小节将被打印到身份证上.假设每个条的宽度最小为0.2mm,则宽度总计超过200厘米.我认为您的设计要求需要进行审查.
另外,您可能需要考虑可以包含更多信息的2D条码类型.

OP更新了问题,指出他正在使用2D条码,因此我的评论可能无效.但是,问题仍然在于,图像中的每个条形或正方形必须大于某个固定的最小大小才能可读.压缩,无论是无损还是有损,都不是问题.[/edit]
Considering the barcode uses (probably) 8 bars per digit that makes a total of 10400 bars to be printed onto an id card. Assume that each bar is a minimum of 0.2mm wide, that gives a total of over 200 centimeters width. I think your design requirements need to be reviewed.
Alternatively you may need to consider the 2D barcode types which can contain more information.

[edit]OP has updated the question to state that he is using 2D barcodes, so my comments are probably not valid. However, the issue remains that each bar or square in the image must be above some fixed minimum size in order to be readable. Compression, whether lossless or lossy is hardly the issue.[/edit]


Richard是正确的.我要补充:无损压缩是完全可行的;有很多这样的方法,但是并不能挽救局面.您需要重新考虑数据管理.

—SA
Richard is right. I would add: lostless compression is perfectly feasible; there is a number of such methods, but it won''t save the situation; you need to rethink your data management.

—SA


这篇关于减小生成的条形码图像的大小,而不会造成任何数据丢失.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆