Skip to content

Releases: not-lain/loadimg

v0.5.0

22 Jul 18:34

Choose a tag to compare

Loadimg 0.5.0

What's Changed

from loadimg.utils import load_img

url = load_img(img, output_type="url")
from loadimg.utils import load_imgs
images = load_imgs(image_dir, output_type="pil")
for filename, img in images.items():
    print(f"Loaded {filename}: {img}")

New Contributors

LOADIMG FUTURE RELEASES █████░
Full Changelog: v0.4.0...v0.5.0

v0.4.0

26 Jan 15:00
c45d346

Choose a tag to compare

Loadimg 0.4.0

What's Changed

Terminal

>>>  loadimg https://icon-library.com/images/50x50-icon/50x50-icon-0.jpg --output-type ascii
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##*###%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%********#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#######****#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#########****%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%###########***#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#############**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#############**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#############**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%########%%@@@%#############**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#****########%@@@#############**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#***#############@@@%############**%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%***###############%@@@%##########***%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#**#################%@@@%##########**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%*####################%@@@%#########**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%######################%%@@@%######***%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%#######################%%%%#####**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%%%%%%%%##################***%@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%%%#####################**#@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%###########################***@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#############################***#@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###############################*****#@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#################################*****#%@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%####################################*****#@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#######################################*****%@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#########################################*****#@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%############################################****#@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###############################################****#%@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#################################################*****%@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@####################################################****%@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@%#####################################################****%@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@%#######################################################***#%@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@%#########################################################***#@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@%############################################################**#@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@##############################################################**#@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@%###############################################################**%@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@%#################################################################*#@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@###################################################################*#@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@%####################################################################*%@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@#################################%@@#################################*#@@@@@@@
@@@@@@@@@@@@@@@@@@@@@%################################%@@@@#################################*%@@@@@@
@@@@@@@@@@@@@@@@@@@@@#################################@@@@@@###############################@##@@@@@@
@@@@@@@@@@@@@@@@@@@@%################################%@@@@@@@%###########################%@@@*%@@@@@
@@@@@@@@@@@@@@@@@@@@#################################@@@@@@@@@%#########################%@@@@##@@@@@
@@@@@@@@@@@@@@@@@@@%################################%@@@@@@@@@@@######################%@@@@@@@*%@@@@
@@@@@@@@@@@@@@@@@@@#################################@@@@@@@@@@@@@%###################%@@@@@@@@##@@@@
@@@@@@@@@@@@@@@@@@%################################%@@@@@@@@@@@@@@@################%@@@@@@@@@@%*%@@@
@@@@@@@@@@@@@@@@@@%#################################%@@@@@@@@@@@@@@@%#############%@@@@@@@@@@@@##@@@
@@@@@@@@@@@@@@@@@@####################################@@@@@@@@@@@@@@@@%#########%@@@@@@@@@@@@@@##@@@
@@@@@@@@@@@@@@@@@%#####################################%@@@@@@@@@@@@@@@@%#####%@@@@@@@@@@@@@@@%##@@@
@@@@@@@@@@@@@@@@@%#######################################@%@@@@@@@@@@@@@@@##%@@@@@@@@@@@@@@%%####%@@
@@@@@@@@@@@@@@@@@#######################################%%..=#@@@@@@@@@@@@@@@@@@@@@@@@@@@@#######%@@
@@@@@@@@@@@@@@@@@#######################################@=    :=#@@@@@@@@@@@@@@@@@@@@%+*@@#######%@@
@@@@@@@@@@@@@@@@%######################################%@. ..    :=#@@@@@@@@@@@@@@%+:. .%@%######%@@
@@@@@@@@@@@@@@@@%######################################%#  .....    :=#@@@@@@@@%*-.   . +@%#######@@
@@@@@@@@@@@@@@@@%######################################@* ..... -#%+.  :=#@@@%#:   .... :@%#######@@
@@@@@@@@@@@@@@@@#######################################@* .... .%@@@+    .##:%@#. ...   :@%#######@@
@@@@@@@@@@@@@@@@#######################################@* .... -@@@@* ... #*.@@@:     ..:@%#######@@
@@@@@@@@@@@@@@@@#######################################@#. ... :@@@@- .. .@# +@* .-+*#%%%@@#######@@
@@@@@@@@@@@@@@@@#######################################%@: ...  :++: .  .+@@-...+%@@@@@@@%@%######@@
@@@@@@@@@@@@@@@%#######################################%@*     .       -#@%%@%+%@%%###############@@
@@@@@@@@@@@@@@@%########################################@@=-=*#%%%%##*#@#=--=#@@@%################@@
@@@@@@@@@@@@@@@%########################################%@@@@@@%%%%%@@%=------=#@@%###############@@
@@@@@@@@@@@@@@@@########################################%@@%%#####%@@+----------=%@@%############%@@
@@@@@@@@@@@@@@@@########################################%%#######%@#--------------*@@%###########%@@
@@@@@@@@@@@@@@@@################################################%@*----------------=@@%##########%@@
@@@@@@@@@@@@@@@@###############################################%@+-------------------%@%#########@@@
@@@@@@@@@@@@@@@@%#############################################%@+---------------------#@%########@@@
@@@@@@@@@@@@@@@@%############################################%@+-----------------------#@%#######@@@
@@@@@@@@@@@@@@@@%###########################################%@#-------------------------#@%#####%@@@
@@@@@@@@@@@@@@@@@###########################################@@=--------------------------%@#####@@@@
@@@@@@@@@@@@@@@@@%################################**++=====*@#:--------------------------=@@####@@@@
@@@@@@@@@@@@@@@@@%############################*+==---------#@@*---------------------------*@%##%@@@@
@@@@@@@@@@@@@@@@@@#########################*+=-------------%@%@@#*+=-----------------------@@##@@@@@
@@@@@@@@@@@@@@@@@@%######################+=----------------@#.:=*%@@@%#*++==---------------*@#%@@@@@
@@@@@@@@@@@@@@@@@@@%###################+=------------------@#     .-#@@@@@@@@%#*+=---------=@%@@@@@@
@@@@@@@@@@@@@@@@@@@%###############%#*=--------------------#%.   :+#@@#*+++**#%%@@@#*=------@@@@@@@@
@@@@@@@@@@@@@@@@@@@@%#############%#=----------------------+@+ -#@@#+=---------==+*#@@%+----%@@@@@@@
@@@@@@@@@@@@@@@@@@@@@%###########%*-------------------------#@#@%*=--===========---+@%%@%+--%@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@%########%#+---------------------------#@@+--=============--*@%###%@#=%@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@%######%#=-----------------------------+@@+-============-=%@%######@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@%####%#=-------------------------------=%@*=-========--+@%########@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@%##%#=----------------------------------*@%+--=====-=#@#-=######@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@%##=------------------------------------=%@%+----=*@@*---*####@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@%=---------------------------------------*@@%+=+%@%=----=###@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+---------------------------------------=#@@@@@#-------*%@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#=---------------------------------------=#@%+--------#@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#=---------------------------------------=--------+%@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#=--------------------------------------------=#@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+=---------------------------------------+#@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#+=---------------------------------=*%@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*=---------------------------=*%@@@@@@@@@...
Read more

v0.3.6

17 Jan 01:01
a975fb3

Choose a tag to compare

Loadimg 0.3.6

What's Changed

LOADIMG FUTURE RELEASES █████░

Full Changelog: v0.3.5...v0.3.6

v0.3.5

25 Nov 22:24

Choose a tag to compare

Loadimg 0.3.5

What's Changed

  • hotfix for huggingface and drive urls 🛠️ @not-lain
  • more chill url handling
from loadimg import load_img
url = "https://storage.googleapis.com/isolate-dev-hot-rooster_toolkit_bucket/github_110602490/0127d6b615a64c2ab68a5460a7913067_95628e8b60354f2982f4d2af22696f8a.png?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=gke-service-account%40isolate-dev-hot-rooster.iam.gserviceaccount.com%2F20241125%2Fauto%2Fstorage%2Fgoog4_request&X-Goog-Date=20241125T221525Z&X-Goog-Expires=604800&X-Goog-SignedHeaders=host&X-Goog-Signature=85e87080a622d05d2904518fdbf780c10fecc34de12603361fa3a2822b6ca4c4547ed336ab4faa76ce6320bbd62d309f1687f2ba6bcf30b1e1c48dc5b7089c8d1fb4fa42549e24dc5b62b62654f699cbeb68ad5a27f16d689709b394392837d7f43f8fd1043542e3edb8582f7c5477bf726db996c10af112dc3a8cd2ace41e08743b2126242f65cfc57afa8add10dc467028f67be0cd9c97c64d1ab21d547710650f63a3b0145f1ef903eef3269d522d75429a342995326b254d3ad5c09f03f2fb413c5dfad8b2703844e2ed5eb11a3595a4f666428134f20019ae4d7cce09460d3de8a1bf4c1eed6a09596320f7c168f96ae833c7d5e74bdb870c5de48ea21e"
load_img(url)

image

LOADIMG FUTURE RELEASES █████░
Full Changelog: v0.3.4...v0.3.5

v0.3.4

25 Nov 22:03
41cb5e8

Choose a tag to compare

Loadimg 0.3.4

What's Changed

LOADIMG FUTURE RELEASES █████░

Full Changelog: v0.3.3...v0.3.4

v0.3.3

10 Nov 18:10
276bd2d

Choose a tag to compare

Loadimg 0.3.3

What's Changed

  • update base64 implementation to support huggingface inference by @not-lain in #13

this will support sending images to huggingface inference API as base64

from loadimg import load_img
from huggingface_hub import InferenceClient

# or load a local image
my_b64_img = load_img("https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg", output_type="base64" ) 

client = InferenceClient(api_key="hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")

messages = [
	{
		"role": "user",
		"content": [
			{
				"type": "text",
				"text": "Describe this image in one sentence."
			},
			{
				"type": "image_url",
				"image_url": {
					"url": my_b64_img # base64 allows using images without uploading them to the web
				}
			}
		]
	}
]

stream = client.chat.completions.create(
    model="meta-llama/Llama-3.2-11B-Vision-Instruct", 
	messages=messages, 
	max_tokens=500,
	stream=True
)

for chunk in stream:
    print(chunk.choices[0].delta.content, end="")

LOADIMG FUTURE RELEASES █████░

Full Changelog: v0.3.2...v0.3.3

v0.3.2

12 Oct 20:12

Choose a tag to compare

Loadimg 0.3.2

What's Changed

  • fix huggingface file download

Full Changelog: v0.3.1...v0.3.2

LOADIMG FUTURE RELEASES █████░

0.3.1

08 Sep 18:43
11c8b20

Choose a tag to compare

Loadimg 0.3.1

What's Changed

New Contributors

Full Changelog: v0.3.0...v0.3.1

LOADIMG FUTURE RELEASES █████░

v0.3.0

01 Sep 16:23

Choose a tag to compare

Loadimg 0.3.0

What's Changed

  • Added option to select Image input_type and also made Base64 image support better. by @KingNish24 in #8

New Contributors

Full Changelog: v0.2.1...v0.3.0

LOADIMG FUTURE RELEASES █████░

v0.2.1

30 Aug 19:52

Choose a tag to compare

🛠️Hotfix for the version parameter