We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Datamatrix Barcode Size

HiWhen generating 2D Datamatrix barcode of 300dpi, the file size reaches 390kb which is huge, i think, is there a way to reduce this file size. Any advise would be greatly appreciated. I am using Aspose Barcode 5.5

private static int generatebarcode()
{
using (Aspose.BarCode.BarCodeBuilder myBarCode = new BarCodeBuilder("0001XXLETTER0000020G00000000100XXXXXXXLTR", Symbology.DataMatrix))
{
myBarCode.CodeLocation = CodeLocation.None;
myBarCode.AutoSize = true;
myBarCode.ImageWidth = 0.25f;
myBarCode.ImageHeight = 0.25f;
myBarCode.ImageQuality = ImageQualityMode.Default;
myBarCode.Margins = new Aspose.BarCode.MarginsF(0, 0, 0, 0);
myBarCode.GraphicsUnit = GraphicsUnit.Inch;
myBarCode.Resolution = new Resolution(300, 300, ResolutionMode.Customized);
using (MemoryStream myBarCodeImage = new MemoryStream())
{
string myBarCodeImageFile = @"C:\Temp\AsposeBarcodePdfTesting\" + Path.GetRandomFileName() + ".jpeg";
myBarCode.Save(myBarCodeImageFile, BarCodeImageFormat.Jpeg);
myBarCode.BarCodeImage.Dispose();
}
myBarCode.Dispose();
}
return 0;
}

Hi Ujjwal,


Thank you for contacting support. I tested your sample code against the latest build of Aspose.BarCode 5.9.0. I’m afraid. I’m not able to further reduce its size from 390kb. I have logged an investigation under ticket id BARCODENET-33766 in our issue tracking system. Our development team will look into the matter. Your request has also been linked to this issue. We shall let you know once a significant progress has been made. We’re sorry for your inconvenience.

Hi Ujjwal,

From the specifics of ticket id BARCODENET-33766, please share a bit more details regarding expected image size. I mean what size in pixels you require. It will help our development team to investigate further.

Hi Imran

I am trying to generate a barcode with 300dpi, 75*75pixels which i am hoping would be less than 20-50kb.

Does this help

Thanks

Hi Ujjwal,


Thank you for this information. I have passed this information to our development team. As soon as we have made some significant progress, we would be more than happy to update you with the status of correction.

Hi Imran

Can you share update on this issue ? Do you think it will make next release ? Is there any way we can expediate this request as it is affecting our productivity.

Thanks

Hi Ujjwal,


Thank you for asking about the resolution. I’m afraid. This issue is pending for analysis and not resolved yet. Anyway, I would like to update you that our development team has plans to include the fix of issue id BARCODENET-33766 in our next release of Aspose.BarCode for .NET 6.1.0. It is expected to be released at the start of next month. We will let you know once the issue is resolved.

Hi Ujjwal,


Thank you for being patient. We have a good news for you is BARCODENET-33766 has now been resolved and its fix will be included in the next version of Aspose.BarCode for .NET 6.1.0. It is expected at the start of the next month. We will inform you via this forum thread as soon as the new release is published.

Hi Imran

Any update on this ?

Thanks

Hi Ujjwal,


Thank you for asking about the resolution. The said issue has been fixed and it would be a part of our next release Aspose.BarCode 6.1.0. Our development team is working hard to deliver this release. It will be published in the next one or two weeks. Please be patient and spare us a bit more time.

The issues you have found earlier (filed as BARCODENET-33766) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi

This issue is still not resolved, please reopen this ticket. I am seeing same file size with new version 6.1 (.net v4.0). Can you please look into this and update me. Also please escalate this issue, we have already waited 3 months to get this issue resolved.

Thanks

Hi Ujjwal,


Thank you for your inquiry. Please use the following sample code:

using (BarCodeBuilder builder
= new BarCodeBuilder())<o:p></o:p>

{

builder.SymbologyType = Symbology.DataMatrix;

builder.CodeText = "0001XXLETTER0000020G00000000100XXXXXXXLTR";

builder.CodeLocation = CodeLocation.None;

builder.GraphicsUnit = GraphicsUnit.Pixel;

builder.Resolution.DpiX = 300;

builder.Resolution.DpiY = 300;

builder.Margins.Set(0);

Bitmap bmp = bb.GetCustomSizeBarCodeImage(new Size(75, 75), false);

bmp.Save("barcode.jpg");

}


Please do let us know in case of any comments or questions.