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
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
Art directed cropping, useful for responsive images

Art direction sets a focal point and can be used when you need multiple copies of the same Image but also in in different proportions.

Daniel 1 Aug 16, 2022
QR-Generator - An awesome QR Generator to create or customize your QR's

QR Generator An awesome QR Generator to create or customize your QR's! Table of

Tristán 1 Jan 28, 2022
Image manipulation package used for EpicBot.

Image manipulation package used for EpicBot.

Nirlep_5252_ 7 May 26, 2022
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
Tools for making image cutouts from sets of TESS full frame images

Cutout tools for astronomical images Astrocut provides tools for making cutouts from sets of astronomical images with shared footprints. It is under a

Space Telescope Science Institute 20 Dec 16, 2022
A ray tracing render implemented using Taichi language.

A ray tracing render implemented using Taichi language.

Mingrui Zhang 45 Oct 23, 2022
Convert the SVG code to PNG and replace the line by a call to the image in markdown

Convert the SVG code to PNG and replace the line by a call to the image in markdown

6 Sep 06, 2022
:rocket: A minimalist comic reader

Pynocchio A minimalist comic reader Features | Installation | Contributing | Credits This screenshots contains a page of the webcomic Pepper&Carrot by

Michell Stuttgart 73 Aug 02, 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
Unique image & metadata generation using weighted layer collections.

nft-generator-py nft-generator-py is a python based NFT generator which programatically generates unique images using weighted layer files. The progra

Jonathan Becker 243 Dec 31, 2022
Tool to create a Phunk image with a custom background

Create Phunk image Tool to create a Phunk image with a custom background Installation Clone the repo git clone https://github.com/albanow/etherscan_sa

Albano Pena Torres 6 Mar 31, 2022
A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities.

Colour - Demosaicing A Python package implementing various CFA (Colour Filter Array) demosaicing algorithms and related utilities. It is open source a

colour-science 218 Dec 04, 2022
This script is for photographers to do timeslice with one click.

One Click TimeSlice Tool What is this for This is for photographers who want to create TimeSlice pictures without installing PS plugins. Before using

Xi Zhao 13 Sep 23, 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
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
Leshycam - Generate Inscryption styled portrait sprites from any image

Leshy's Camera Generate Inscryption styled portrait sprites from any image. Setu

3 Sep 27, 2022
Create a random fluent image based on multiple colors.

FluentGenerator Create a random fluent image based on multiple colors. Navigation Example Install Update Usage In Python console FluentGenerator Fluen

1 Feb 02, 2022
sK1 2.0 cross-platform vector graphics editor

sK1 2.0 sK1 2.0 is a cross-platform open source vector graphics editor similar to CorelDRAW, Adobe Illustrator, or Freehand. sK1 is oriented for prepr

sK1 Project 238 Dec 04, 2022
Napari simpleitk image processing

napari-simpleitk-image-processing (n-SimpleITK) Process images using SimpleITK in napari Usage Filters of this napari plugin can be found in the Tools

Robert Haase 11 Dec 19, 2022