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
A 3D structural engineering finite element library for Python.

An easy to use elastic 3D structural engineering finite element analysis library for Python.

Craig 220 Dec 27, 2022
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
FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it.

FrostedGlass FrostedGlass is a translucent frosted glass effect widget, that creates a context with the background behind it. The effect is drawn on t

Kivy Garden 24 Dec 10, 2022
PyGram Instagram-like image filters.

PyGram Instagram-like image filters. Usage First, import the client: from filters import * Instanciate a filter and apply it: f = Nashville("image.jp

Ajay Kumar Nagaraj 102 Feb 21, 2022
Gallery written in Python to manage your photos

GalleryMan Gallery written in Python to manage your photos Installation

Asian Cat 24 Dec 18, 2022
Generate waves art for an image

waves-art Generate waves art for an image. Requirements: OpenCV Numpy Example Usage python waves_art.py --image_path tests/test1.jpg --patch_size 15 T

Hamza Rawal 18 Apr 04, 2022
Transfers a image file(.png) to an Excel file(.xlsx)

Transfers a image file(.png) to an Excel file(.xlsx)

Junu Kwon 7 Feb 11, 2022
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
Fast batch image resizer and rotator for JPEG and PNG images.

imgp is a command line image resizer and rotator for JPEG and PNG images.

Terminator X 921 Dec 25, 2022
Simple to use image handler for python sqlite3.

SQLite Image Handler Simple to use image handler for python sqlite3. Functions Function Name Parameters Returns init databasePath : str tableName : st

Mustafa Ozan Çetin 7 Sep 16, 2022
Cat avatars for adult independent users

Cat avatars for adult independent users Samples (Natasha, wake up!) Usage Check values from https://shantichat.github.io/avacats/index.json: { "sizes"

4 Nov 05, 2021
㊙️ Create standard barcodes with Python. No external dependencies. 100% Organic Python.

python-barcode python-barcode provides a simple way to create barcodes in Python. There are no external dependencies when generating SVG files. Pillow

Hugo Barrera 419 Dec 26, 2022
A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

A minimal python script for generating bip39 seed phrases, and corresponding Seed Signer Seed seed phrase qr code ready for offline printing.

CypherToad 8 Sep 12, 2022
Convert any binary data to a PNG image file and vice versa.

What is PngBin? The name PngBin comes from an image format file extension PNG (Portable Network Graphics) and the word Binary. An image produced by Pn

Nathan Young 87 Dec 22, 2022
A script to generate a profile picture and a banner that show the same image on Discord.

Discord profile picture & banner generator A script to generate a profile picture and a banner that show the same image on Discord. Installation / Upd

Victor B. 9 Nov 27, 2022
display: a browser-based graphics server

display: a browser-based graphics server Installation Quick Start Usage Development A very lightweight display server for Torch. Best used as a remote

Szymon Jakubczak 205 Oct 17, 2022
ProsePainter combines direct digital painting with real-time guided machine-learning based image optimization.

ProsePainter Create images by painting with words. ProsePainter combines direct digital painting with real-time guided machine-learning based image op

Morphogen 276 Dec 17, 2022
Pixel Brush Processing Unit

Pixel Brush Processing Unit The Pixel Brush Processing Unit (PBPU for short) is a simple 4-Bit CPU I designed in Logisim while I was still in school a

Pixel Brush 2 Nov 03, 2022
Draw a torus passing through three given points.

PyTorusThreePoints Draw a torus passing through three given points. Usage import numpy as np import pyvista as pv from torus_three_points.main import

2 Nov 19, 2021
Blender addon - convert empty image reference to image plane

Reference to image plane Convert reference images to a textured image mesh plane. As if it was imported with import image as plane Use on drag'n'dropp

Samuel Bernou 6 Nov 25, 2022