π― 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.