Skip to content

ESH Image Toolkit is a custom-built image processing project written entirely in C. It allows you to convert standard BMP images(biBitCount=24,biCompression=0,biHeight>0) into a custom image format called .esh, and then view them using a pixel-by-pixel SDL2-based viewer.

Notifications You must be signed in to change notification settings

Prashant-0409/ESH_Image_Toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–ΌοΈ ESH Image Toolkit

ESH Image Toolkit is a custom-built image processing project written entirely in C.
It allows you to convert standard BMP images(biBitCount=24,biCompression=0,biHeight>0) into a custom image format called .esh,
and then view them using a pixel-by-pixel SDL2-based viewer.


πŸš€ Features

  • 🧱 Custom Image Format (.esh) β€” designed from scratch with a simple header structure.

  • 🧩 Header Fields

    #pragma pack(push, 1)
    typedef struct
    {
        int16_t eshType;
        int32_t eshHeight;
        int32_t eshWidth;
        int32_t eshSize;
        int32_t eshOffBits;
    } ESHHEADER;
    #pragma pack(pop)
    
      eshType β†’ File signature
    
      eshHeight β†’ Image height (in pixels)
    
      eshWidth β†’ Image width (in pixels)
    
      eshSize β†’ Total file size
    
      eshOffBits β†’ Pixel data offset
    
      Each pixel is stored in 4 bytes (R, G, B, A) format.
    
      βš™οΈ CLI Support β€” Convert and view images directly from the terminal.
    
      🎨 SDL2 Viewer β€” Renders images pixel by pixel using the SDL2 graphics library.
    
      πŸ› οΈ Developed from Scratch β€” No external frameworks except SDL2.

πŸ“Έ How It Works

Take any BMP image as input.

Convert it into .esh format using your converter tool.

Open the .esh file using your custom ESH Viewer.

The viewer reads the header, extracts pixel data, and renders the image pixel by pixel on screen.

πŸ§‘β€πŸ’» Usage 1️⃣ Convert BMP β†’ ESH

./bmp2esh input.bmp output.esh

2️⃣ View ESH Image

./esh_viewer output.esh

Make sure SDL2 is installed on your system before running the viewer.

🧱 Build Instructions πŸ”§ Requirements

GCC or any C compiler

SDL2 development library

πŸ—οΈ Build Command

gcc bmp2esh.c -o bmp2esh gcc esh_viewer.c -o esh_viewer -lSDL2

🧠 Future Improvements

Add compression support

Include metadata (author, timestamp, etc.)

Support for alpha transparency and filters

GUI-based converter & viewer

πŸ‘¨β€πŸ’» Developer

Developed by Prashant Shaw

πŸ’‘ B.Tech CSE | 2nd Year | Passionate about low-level graphics and systems programming. 🏷️ License

This project is open-source. Feel free to explore, modify, and learn from it.


About

ESH Image Toolkit is a custom-built image processing project written entirely in C. It allows you to convert standard BMP images(biBitCount=24,biCompression=0,biHeight>0) into a custom image format called .esh, and then view them using a pixel-by-pixel SDL2-based viewer.

Topics

Resources

Stars

Watchers

Forks

Languages