Web Demos
BARCODE READER SDK DEMO
Explore the flexibe barcode reading settings to optimize for your specific usage scenario.
WEB TWAIN SDK DEMO
Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.
In JPG, BMP, PNG, TIF
You can use the method GetImageSizeWithSpecifiedType
to get the file size in JPG, BMP, PNG, TIF.
For example,
m_ImageCore = new ImageCore();
int FileSizeinJPG = m_ImageCore.IO.GetImageSizeWithSpecifiedType(m_ImageCore.ImageBuffer.CurrentImageIndexInBuffer, EnumImageFileFormat.WEBTW_JPG); //Calculates the file size in JPG for the current image.
In PDF
Since PDF Module has been separated from version 7.0, the supported format for GetImageSizeWithSpecifiedType
does not include PDF.
If you want to get the file size in PDF format, please follow the steps below.
Step1: Download Dynamsoft.Core.Util.cs and add it to the solution.
Step2: Refer to the sample code.
m_ImageCore = new ImageCore();
m_PDFCreator = new PDFCreator();
int FileSizeinPDF = Dynamsoft.Core.Util.GetImageSizeWithSpecifiedType(m_ImageCore, m_PDFCreator, m_ImageCore.ImageBuffer.CurrentImageIndexInBuffer, EnumImageFileFormatEx.WEBTW_PDF); //Calculates the file size in PDF for the current image.
latest version