Imageresolver

Latest version: v0.4.2

Safety actively analyzes 623395 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.4.2

- Bug fixes
- fixed version requirements failing in setup

0.4.0

- Now supports Python3
- Removed bin/resolveimage.py and moved code to __main__.py
- resolve an image on the command line with python -m imageresolver <options> <url>
- Reorganized module
- created a base exception
- moved all exceptions to imageresolver.exc
- moved logic to imageresolver.base
- Bug fixes
- fixed opengraph detecting invalid images

0.3

- Added plugin support
- Created plugin directory
- Removed the ImgurPageResolver class, replaced with the imgur.py plugin.
- Added instagram, flickr plugins
- Changed WebResolver defaults, load_images and use_js_ruleset now default to true.
- Added another rule to the js_ruleset
- Added several command options to resolveimg.py to help with debugging and
performance testing.
- Fixed some bugs
- changed data files installation directory after installing
from setup.py
- Added opengraph plugin

0.2.1

- fixed an oopsy in setup.py and some other minor tweaks to docs

0.2.0

- Some jpg images did not have enough data to properly set the width and
height of the image. This lead to exceptions. Now system continue tries
to read up to max_read_size bytes to find the proper width and height
info
- Exceptions when loading images are caught and logged by default. Pass
skip_fetch_errors=False to WebpageResolver to raise exceptions
- Added boost_ options to file types. Add (int) value to the score of
particular file extensions. These options add value to the score only when
checking images directly. If a file is already blacklisted the
additional score does not get added. The value can also be negative to
drop the score of certain files.
- Changed significance logic. Surface calculation adds to score in
multiples of the significant_surface variable (now added as an option to
WebpageResolver)
- Removed additional sorting by score. As images are processed the highest
score is held and that image is used. (performance)
- Added options to global ImageResolver:
- max_read_size: max number of bytes of an image to read (default
10240 or 10 K)
- read_all: ignore max read size and load the entire image before
detecting properties
- chunk_size: size of bytes to read at a time (default 1024)
- debug: Enable debugging
- boost_jpeg: Adds a scoring boost to JPG files (default 1)
- boost_gif: Adds a scoring boost to GIF files (default 0)
- boost_png: Adds a scoring boost to PNG files (default 0)
- Added options to WebpageResolver
- significant_surface: integer of the width and height multiplied
(e.g. 16 * 16) (default: 10000)
- skip_fetch_errors: If True, skips and logs errors received while
fetching or reading image info. (default True)
- Added a logger "ImageResolver"
- Added __version__ to the module
- Added command line options to resolveimg.py for debugging and
controlling the chunk sizes
- Fixed some bugs
- "data:" URLs caused an exception. Changed to ignore "data:" URLs as
they are unlikely to be significant images.
- _score was called multiple times when it shouldn't have been
- connections were not explicitly closed which caused performance
issues
- Fixed URLs specified without protocol
- Removed README.md and moved README.txt to README.rst.

0.1.5

- Fixed indent error introduced in 0.1.4
- fixed exception when processing some jpg files

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.