[英]DPI of an image
我有一個要求,我必須檢查以blob形式存儲在oracle數據庫中的一堆圖像的DPI,並確保它們高於300 dpi。 我打算通過ac#程序閱讀該字段並嘗試確定其dpi,但是我不確定如何計算該值。 誰能給我一些有關如何確定其DPI的指導。
顧名思義,DPI代表每英寸的像素數。 要計算它,您需要以英寸和像素為單位的圖像大小。 以英寸為單位的尺寸是相對於顯示器屏幕dpi而言的,像打印機這樣的最佳分辨率使用的英寸數更多。
因此,如果您的圖像具有100px和2in,則dpi為100/2 = 50 dpi。 意識到問題在於,如果基本上需要獲取英寸參考,則如何確定圖像的英寸大小。
然后,將更容易驗證上傳圖像的dpi並保證插入之前所需的圖像。
[英]Increase the resolution (dpi) of an image
[英]How to change resolution (DPI) of an image?
[英]Change the image resolution to 300 dpi
[英]Determining resolution (DPI) of an uploaded image
[英]WPF Image as ToolTip - DPI issue
[英]C# change dpi of an uploaded image
[英]DPI, Image width and height vs Quality
[英]Set DPI value to Tiff Image in C#
[英]Saving DrawingVisual to an image file with a given DPI
[英]How to Get DPI of Image in C#
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.