We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33bad0f commit 353ed9bCopy full SHA for 353ed9b
ethical-hacking/image-metadata-extractor/image_metadata_extractor.py
@@ -8,16 +8,18 @@
8
# read the image data using PIL
9
image = Image.open(imagename)
10
11
-#extract other metadata
12
-info_dict={"Filename":image.filename,
13
- "Image Size":image.size,
14
- "Image Height":image.height,
15
- "Image Width":image.width,
16
- "Image Format":image.format,
17
- "Image Mode":image.mode,
18
- "Image is Animated": getattr(image, "is_animated", False),
19
- "Frames in Image":getattr(image, "n_frames", 1)
20
- }
+# extract other basic metadata
+info_dict = {
+ "Filename": image.filename,
+ "Image Size": image.size,
+ "Image Height": image.height,
+ "Image Width": image.width,
+ "Image Format": image.format,
+ "Image Mode": image.mode,
+ "Image is Animated": getattr(image, "is_animated", False),
+ "Frames in Image": getattr(image, "n_frames", 1)
21
+}
22
+
23
for label,value in info_dict.items():
24
print(f"{label:25}: {value}")
25
@@ -33,3 +35,4 @@
33
35
if isinstance(data, bytes):
34
36
data = data.decode()
37
print(f"{tag:25}: {data}")
38
0 commit comments