1. الرئيسية
  2. /
  3. المدوّنة
  4. /
  5. python program to Find Resolution of JPEG Image
بايثون

python program to Find Resolution of JPEG Image

September 27, 2022 1 دقيقة قراءة 2,270
python program to Find Resolution of JPEG Image
num = int(input("Enter a number: "))   def jpeg_res(filename):     with open(filename,'rb') as img_file:         img_file.seek(163)         a = img_file.read(2)         height = (a[0] << 8) + a[1]         a = img_file.read(2)         width = (a[0] << 8) + a[1]     print("The resolution of the image is",width,"x",height)  jpeg_res("img1.jpg")
شارك المقال:
اقرأ أيضاً

مقالات ذات صلة