Skip to content

Instantly share code, notes, and snippets.

View mirusu400's full-sized avatar
🐿️

mirusu400 mirusu400

🐿️
View GitHub Profile
@mirusu400
mirusu400 / grayscale_viewer.py
Last active September 19, 2022 06:56
8bit Grayscale Image viewer
from PIL import Image, ImageQt
# Python 3
from PyQt5.QtWidgets import QMainWindow, QApplication, QLabel, QFileDialog, QPushButton
from PyQt5.QtGui import QPixmap
import sys
class MainWidget(QMainWindow):
def __init__(self):
super().__init__()
self.link = ""
from PIL import Image
import os
import re
def sorted_alphanumeric(data):
convert = lambda text: int(text) if text.isdigit() else text.lower()
alphanum_key = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ]
return sorted(data, key=alphanum_key)
@mirusu400
mirusu400 / imagetopdf.py
Created October 2, 2021 07:35
This is a simple python code snippet which make folder (which contains image) convert to pdf resurcively.
from PIL import Image
import os
"""
Written By : mirusu400
This is a simple python code snippet which make folder (which contains image) convert to pdf resurcively.
This can automatically resize (1500px) and setting quality to 95, so if you need to modify, change it manually.
Just put in root of folder, and run this code.
"""
path_dir = os.path.dirname(os.path.realpath(__file__))
folder_list = os.listdir(path_dir)