TRREASURE_IMAGE is python lib by which you can hide anything in a .jpg image with Command-Line Interface[cli] feature

Overview

TRREASURE_IMAGE

TRREASURE_IMAGE is a python third-party library with Command-Line Interface[cli] feature.

Table of Contents

General Information

You can do some awesome things like hide anything in a .jpg image or even make a gif from normal images with two lines of code or covert text files and images.

What can you do with it?

  • can hide secret messages or executable file or images and share by another image.
  • can easily make gifs using photos for free
  • can convert images and text files also

Python library Used

  • language info: python - version 3+
  • python standard libraries - [ logging, io, os, pathlib, argparse]
  • python third-party libraries - Pillow(version 8.3.2)

Setup

Get it on PYPI

  • pip install
pip install Treasure-Image

Usage

  • To hide someting in a jpg file you have to use the PIRATE module like below,
from treasure_image import PIRATE

#if want to hide a string in example.jpg(host image)
PIRATE.hide_str_treasure(image="example.jpg", treasure="This is a hidden message!")

#if want to hide a image in example.jpg(host image)
PIRATE.hide_img_treasure(image="example.jpg", treasure="hidden_image.png")

#if want to hide a file(.exe, .py, .cpp, .txt etc) in example.jpg(host image)
PIRATE.hide_file_treasure(image="example.jpg", treasure="hidden_file.exe")
  • To hide extract something from a jpg file you have to use the EXPLORER module like below,
from treasure_image import EXPLORER

#if want to extract a string from example.jpg(host image)
EXPLORER.seek_str_treasure(image="example.jpg")

#if want to extract a image from example.jpg(host image)
EXPLORER.seek_img_treasure(image="example.jpg")
# it has two more default parameters which are 'save' and 'treasure_format',
#
# save=True(default) it saves the image in local machine
# if save=False than it only shows the image.
# treasure_format='jpg'(default) if save=True it saves the file in provided treasure_format.

#if want to extract a .exe file from example.jpg(host image)
EXPLORER.seek_exe_treasure(image="example.jpg")
# there is a default perameter 'treasure_name'
# treasure_name='treasure.exe'(default) saves the exe file in the provided name and format.

#if want to extract a script/files from example.jpg(host image)
EXPLORER.seek_file_treasure(image="example.jpg")
# it has two more default parameters which are 'treasure_name' and 'treasure_format',
#
# treasure_name="treasure"(default) it saves the file with provided name
# treasure_format='text'(default) if save=True it the file/script in provided format/type.
  • For creating GIF you have to use the GifMaker module like below,
from treasure_image import GifMaker

GifMaker(imgs_folder="E:\picture",
         image_formate="png",
         title="example", 
         duration="120", 
         loop="5",
).make_gif()

# it has two default parameters which are 'output_folder' and 'optimize'
# output_folder=current working dir.(default)
# optimize=False(default)
  • To convert images in order to use this lib and conver outputed .text files to script use CONVERTER module like below,
from treasure_image import CONVERTER

# if want to convert 'example.png' to 'example.jpg'
CONVERTER.convert_image(target_image="example.png", format_to='jpg')

# if want to convert outputed 'treasure.text' file to script like 'treasure.py'
CONVERTER.convert_to_script(text_file="treasure.text", convert_to="treasure.py")

Cli commands

  • To use CONVERTER module do,

to convert 'example.jfif' to 'example.jpg'

python -m treasure_image CONVERTER -img download.jfif -ft jpg

to convert 'example.txt' to 'example.py'

python -m treasure_image CONVERTER -file example.txt -ct example.py
  • To use GifMaker module do,

to create example.gif from png images stored in E:\picture with a duration of 120ms and 5 loops,

python -m treasure_image GifMaker -imgs E:\picture -if PNG -title example -d 120 -l 5
  • To use PIRATE module do,

to hide a message in 'example.jpg',

python -m treasure_image PIRATE -hm .\example.jpg -tt str -t 'This is massege'

to hide 'to_be_hide.png' in 'example.jpg',

python -m treasure_image PIRATE -hm .\example.jpg -tt img -t .\to_be_hide.png

to hide 'to_be_hide.exe' in 'example.jpg',

python -m treasure_image PIRATE -hm .\example.jpg -tt exe -t .\to_be_hide.exe

to hide 'to_hide_files.py' in 'example.jpg',

python -m treasure_image PIRATE -hm .\example.jpg -tt file -t .\to_hide_files.py
  • To use EXPLORER module do,

to extract a message from 'example.jpg',

python -m treasure_image EXPLORER -hm .\example.jpg -tt str

to extract image from 'example.jpg',

python -m treasure_image EXPLORER -hm .\example.jpg -tt img

to extract exe from 'example.jpg',

python -m treasure_image EXPLORER -hm .\example.jpg -tt exe

to hide files/scripts from 'example.jpg',

python -m treasure_image EXPLORER -hm .\example.jpg -tt file

Project Status

Project is: in progress

Any kind of Support will be appreciate.

To do

  • Support for image formats as host image (currently jpg is allowed)
  • Support for vector graphics (.svg, .ai etc)

Contact

Created by @FatinShadab - feel free to contact me!

License

This project is open source and available under the MIT License.

Owner
Fatin Shadab
Open source python developer, Student and very curious by nature (:
Fatin Shadab
Simple utility to tinker with OPlus images

OPlus image utilities Prerequisites Linux running kernel 5.4 or up (check with uname -r) Image rebuilding Used to rebuild read-only erofs images into

Wiley Lau 15 Dec 28, 2022
DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics

DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics.

Frederik Berlaen 344 Jan 06, 2023
GPU-accelerated image processing using cupy and CUDA

napari-cupy-image-processing GPU-accelerated image processing using cupy and CUDA This napari plugin was generated with Cookiecutter using with @napar

Robert Haase 16 Oct 26, 2022
Py3D - A 3d rendering engine written entirely in python

Py3D is a 3d rendering engine written entirely in python. It is a simple and eas

1up Community 2 Nov 14, 2022
A python script for extracting/removing exif data from images by @AbirHasan2005

Image-Exif A Python script for extracting exif metadata from images. How to use? Using this script you can extract exif data from image and save in .c

Abir Hasan 13 Dec 16, 2022
将位图转为彩色矢量 svg 图片

一个将位图描摹为彩色矢量 svg 图片的程序,是一个命令行工具,使用 Python 脚本实现,运行环境 Python3.8+。 ✨ 效果 以一个字帖图片为例,这是 png 格式的位图(370KB): 这是颜

Haujet Zhao 104 Dec 30, 2022
Pure Python bindings for the pure C++11/OpenCL Qrack quantum computer simulator library

pyqrack Pure Python bindings for the pure C++11/OpenCL Qrack quantum computer simulator library (PyQrack is just pure Qrack.) IMPORTANT: You must buil

vm6502q 6 Jul 21, 2022
A minimal, standalone viewer for 3D animations stored as stop-motion sequences of individual .obj mesh files.

ObjSequenceViewer V0.5 A minimal, standalone viewer for 3D animations stored as stop-motion sequences of individual .obj mesh files. Installation: pip

csmailis 2 Aug 04, 2022
AutoGiphyMovie lets you search giphy for gifs, converts them to videos, attach a soundtrack and stitches it all together into a movie!

AutoGiphyMovie lets you search giphy for gifs, converts them to videos, attach a soundtrack and stitches it all together into a movie!

Satya Mohapatra 18 Nov 13, 2022
MyPaint is a simple drawing and painting program that works well with Wacom-style graphics tablets.

MyPaint A fast and dead-simple painting app for artists Features Infinite canvas Extremely configurable brushes Distraction-free fullscreen mode Exten

MyPaint 2.3k Jan 01, 2023
HTML2Image is a lightweight Python package that acts as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.

A package acting as a wrapper around the headless mode of existing web browsers to generate images from URLs and from HTML+CSS strings or files.

176 Jan 01, 2023
Water marker for images.

watermarker linux users: To fix this error,please add truetype font path File "watermark.py", line 58, in module font = ImageFont.truetype("Dro

13 Oct 27, 2022
QR Code Generator

In this project, we'll be using some libraries to instantly generate authentic QR Codes and export them in various formats

Hassan Shahzad 3 Jun 02, 2022
This Github Action automatically creates a GIF from a given web page to display on your project README

This Github Action automatically creates a GIF from a given web page to display on your project README

Pablo Lecolinet 28 Dec 15, 2022
利用近邻法的弱点实现图片缩小后变成另一张图

这是我一个视频的配套代码。 视频是:利用近邻法的弱点实现图片缩小后变成另一张图 https://www.bilibili.com/video/BV1Lf4y1r7dZ 配套代码中,仅generate.py是核心文件,其余的图片神马的,都是赠品。 这个核心文件利用了近邻法缩放的弱点,可以将图a的像素按

偶尔有点小迷糊 182 Dec 19, 2022
Computational Xmas Tree lights!

Computational Xmas Tree This repo contains the code for the computational illumination of a Christmas Tree! It is based on the work by Matt Parker fro

GSD6338 146 Dec 23, 2022
PyPixelArt - A keyboard-centered pixel editor

PyPixelArt - A keyboard-centered pixel editor The idea behind PyPixelArt is uniting: a cmdpxl inspired pixel image editor applied to pixel art. vim 's

Douglas 18 Nov 14, 2022
Python Image Optimizer Script

Image-Optimizer Download and Install git clone https://github.com/stefankumpan/Image-Optimizer-Script.git cd Image-Optimizer-Script pip install -r req

Stefan Kumpan 0 Jul 15, 2021
Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures.

WADs Out For [The] Ladies Simple Python / ImageMagick script to package images into WAD3s for use as GoldSrc textures. Development mostly focused on L

5 Apr 09, 2022
Tool that takes your photo and generates a pixelated color by number photo.

Color by number Tool that takes your photo and generates a pixelated color by number photo. Requirements You need to have python installed on your com

1 Dec 18, 2021