🎯 Image Resizer: Cracking the Hidden Barrier in Online Exam Forms

🧠 What’s the Problem?

If you’ve ever applied for a government job exam like SSC, Railway, Bank, or even UPSC, you’ve likely faced this frustrating message:

❌ “Your photo must be 6cm x 2cm, 15KB, and 300 DPI.”

But no tool explains what these parameters mean or how to achieve them.

This is not just about resizing images. It’s about understanding how systems silently filter out applicants who don’t meet vague technical specs.


πŸ”§ What This Project Does

Our Image Resizer Tool helps you:

βœ… Upload a photo
βœ… Crop a specific area (with fixed aspect ratio like 6x2 cm)
βœ… Resize it to exact DPI, cm, and KB
βœ… Download the result βœ…

It uses Python (Flask + Pillow) with a web-based UI to assist candidates in preparing their images correctly, especially for rigid form validations.

GitHub: Image Resizer Repo


πŸ–Ό Why Is This Useful?

Many candidates get rejected not because of lack of skills—but because:

  • Image is 18KB instead of 15KB ❌

  • DPI is 96 instead of 300 ❌

  • Width is 5.8cm instead of 6.0cm ❌

This tool ensures you meet every single requirement set by online forms.


πŸ“œ Code Walkthrough

πŸ”Ή Step 1: Upload & Configure

The user uploads an image and enters:

  • Target Size (in KB)

  • Width & Height (in cm)

  • DPI (usually 300)

@app.route("/", methods=["GET", "POST"])
def index():
    if request.method == "POST":
        # Save uploaded file
        # Render cropping interface


πŸ”Ή Step 2: Visual Crop with Aspect Ratio Lock

Using HTML5 canvas, the user selects the area to crop. The crop box maintains a fixed ratio (e.g., 6:2).

let aspectRatio = width_cm / height_cm;
// Users can drag and move rectangle

βœ… Works great with mouse
βœ… Touch support in mobile / laptop


πŸ”Ή Step 3: Resize to Exact Specs

Using Pillow (PIL) in Python:

  • Crop → Resize → Compress

  • Output a JPG image with specified DPI and size

px_width = int((dpi / 2.54) * width_cm)
px_height = int((dpi / 2.54) * height_cm)
resized = cropped.resize((px_width, px_height))


πŸ”Ή Step 4: Compress to Target KB

It tries different JPEG qualities to get below the size limit.

while quality > 10:
    resized.save(buffer, quality=quality)
    if size_kb <= target_kb:
        break


⚠️ The Hidden Filter: Why This Tool Matters

These parameters are not just formatting rules—they act like filters:

  • Many students fail to upload photos.

  • Form gets rejected without warning.

  • You lose your chance to appear.

It’s a silent way of filtering out people without digital knowledge.

This project gives power back to students.


πŸ“š Bonus: Learn the Lingo

Here are essential terms explained simply:

  • DPI: Dots per inch, affects print quality.

  • Pixel: Smallest image unit.

  • Resolution: Total pixel count.

  • Aspect Ratio: Width:Height relationship.

  • Compression: Reduces file size.

  • RGB/CMYK: Screen vs print colors.

  • Transparency: Supported in PNG/WebP, not in JPG.

  • Image Format: JPG, PNG, WEBP—each with its own use.


πŸ’‘ Final Thoughts

Government forms are designed with invisible tech barriers. Tools like this are small but powerful steps toward equal access.

Instead of depending on shady apps or getting your form rejected—use open source.

βœ… Free
βœ… Secure
βœ… Educational
βœ… Your career deserves it


πŸ”— Try It Out

You can host it yourself with:

git clone https://github.com/imvickykumar999/Image-Resizer
cd Image-Resizer
python app.py

Or visit the live demo:
🌐 https://resizeandcrop.pythonanywhere.com


πŸ‘£ Footer

Made with ❀️ by @imvickykumar999


1 Comments

Himanshu

This project is result of real incident, I was filling SSC form and everytime signature upload was rejecting, thanks to this website which helped me.

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading...