I have a picture of 100 x 100 (black and white) and I want to turn it into a 200 x 200 or 400 x 400 image, where each pixel is represented by a 2 x 2 or 4 x 4 square of black pixels.

Is there a way to do that using a Linux one-liner or a simple app available for Macs?


Imagemagic is the tool for you. For 2x2 use

convert input.png -filter point -resize 200% output.png

for 4x4

convert input.png -filter point -resize 400% output.png


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.