增加亮度和对比度后,从相机拍摄的图像在Android



我正在制作一个应用程序,其中我从相机捕获图像并从中制作pdf。

但图像质量较差。所以我想设置图像的亮度和对比度。

  1. 有没有办法提高亮度和对比度后,从相机在Android捕获图像?

  2. 当我裁剪图像并以pdf格式显示它时,捕获图像后,图像的下部已被剪切。

在这个应用程序中,我使用了iText.jar(5.0.6)。

要在生成的pdf中显示完整的图像,请尝试对图像应用'scaleAbsolute'

File newFile = new File(pdfPath);
newFile.createNewFile();
FileOutputStream pdfFile = new FileOutputStream(newFile);
Document document = new Document();
PdfWriter.getInstance(document, pdfFile);
ocument.open();
Rectangle rectangle = document.getPageSize();
Image image = Image.getInstance(imagePath);
image.scaleAbsolute((rectangle.getWidth() - 75.0f),
                    (rectangle.getHeight() - 75.0f));

最新更新