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
vsketch is a Python generative art toolkit for plotters

Generative plotter art environment for Python

Antoine Beyeler 380 Dec 29, 2022
A tool and a library for SVG path data transformations.

SVG path data transformation toolkit A tool and a library for SVG path data transformations. Currently it supports a translation and a scaling. Usage

Igor Mikushkin 2 Mar 07, 2022
Simplest QRGenerator with a cool feature (-sh=True :D)

Simple QR-Codes Generator :D Generates QR-codes, nothing more and nothing less . How to use Just run ./install.sh to set all the dependencies up, th

RENNAARENATA 1 Dec 11, 2021
Anime2Gif - an algorithm that detects scenes in a video and generates gifs from it

Anime2Gif Anime2Gif is an algorithm that detects scenes in a video and generates gifs from it. How to use To use it, first, you'll need to install it'

1 Dec 09, 2021
ModernGL is a python wrapper over OpenGL 3.3+ core

ModernGL is a python wrapper over OpenGL 3.3+ core that simplifies the creation of simple graphics applications like scientific simulations, games or user interface

ModernGL 1.4k Jan 01, 2023
利用近邻法的弱点实现图片缩小后变成另一张图

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

偶尔有点小迷糊 182 Dec 19, 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
Kimimaro: Skeletonize Densely Labeled Images

Kimimaro: Skeletonize Densely Labeled Images # Produce SWC files from volumetric images. kimimaro forge labels.npy --progress # writes to ./kimimaro_o

92 Dec 17, 2022
Glyph-graph - A simple, yet versatile, package for graphing equations on a 2-dimensional text canvas

Glyth Graph Revision for 0.01 A simple, yet versatile, package for graphing equations on a 2-dimensional text canvas List of contents: Brief Introduct

Ivan 2 Oct 21, 2022
A utility for quickly cropping large collections of images.

Crop Tool A utility for quickly cropping large collections of images. Inspired by Derrick Schultz's dataset-tools. Setup It's suggested that you use A

dusk (they/them) 6 Nov 14, 2021
An async Python library to automate solving ReCAPTCHA v2 by audio using Playwright.

Playwright nonoCAPTCHA An async Python library to automate solving ReCAPTCHA v2 by audio using Playwright. Disclaimer This project is for educational

Michael Mooney 69 Dec 28, 2022
This will help to read QR codes using Raspberry Pi and Pi Camera

Raspberry-Pi-Generate-and-Read-QR-code This will help to read QR codes using Raspberry Pi and Pi Camera Install the required libraries first in your T

Raspberry_Pi Pakistan 2 Nov 06, 2021
Open source software for image correlation, distance and analysis

Douglas-Quaid Project Open source software for image correlation, distance and analysis. Strongly related to : Carl-Hauser Problem statement (@CIRCL)

Dominik Dancs 2 May 01, 2022
Music Thumbnail Maker

Music Thumbnail Installing pip install TMFrame

krypton 4 Jan 28, 2022
python app to turn a photograph into a cartoon

Draw This. Draw This is a polaroid camera that draws cartoons. You point, and shoot - and out pops a cartoon; the camera's best interpretation of what

Dan Macnish 2k Dec 19, 2022
A GUI-based (PyQt5) tool used to design 2D linkage mechanism.

Pyslvs-UI A GUI-based (PyQt5) tool used to design 2D linkage mechanism. Planar Linkages Simulation Python-Solvespace: Kernel from Solvespace with Cyth

Yuan Chang 141 Dec 13, 2022
Raven is a tool written in Python3 allowing you to generate an unique image with some text.

🐦 Raven is a tool written in Python3 allowing you to generate an unique image with some text. It does it by searching the text on Google, do

Billy 39 Dec 20, 2022
A simple image-level annotation tool supporting multi-channel images for napari.

napari-labelimg4classification A simple image-level annotation tool supporting multi-channel images for napari. This napari plugin was generated with

4 May 16, 2022
A warping based image translation model focusing on upper body synthesis.

Pose2Img Upper body image synthesis from skeleton(Keypoints). Sub module in the ICCV-2021 paper "Speech Drives Templates: Co-Speech Gesture Synthesis

zhiyh 15 Nov 10, 2022
Png2Jpg tool will help you convert from png image format to jpg images format.

PNG 2 JPG All codes assume running from root directory. Please update the sys path at the beginning of the codes before running. Over View Png2Jpg too

Nguyễn Trường Lâu 2 Dec 27, 2021