Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8201663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:53:37+00:00 2026-06-07T06:53:37+00:00

Is there a way to pad or decompress an image (JPEG) in bash? By

  • 0

Is there a way to pad or “decompress” an image (JPEG) in bash? By this I mean, if the image size is 1.5MB I want it padded up to 5MB, for example. The resultant quality of the image is not (so) important. And if this padding leaves a black rectangle by the side of the image it is acceptable.

EDIT:
THe sole answer below guessed correctly that it was an XY problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:53:39+00:00Added an answer on June 7, 2026 at 6:53 am

    A quick experiment indicates that just appending zero bytes to a *.jpg image file still allows it to be viewed.

    On Unix, I used a command like this:

    ( cat original.jpg ; dd if=/dev/zero bs=1024 count=1024 ) > bigger.jpg
    

    I suspect that any arbitrary data, not just zeros, would have the same result.

    (Using an image editor to append a black rectangle to an image probably wouldn’t increase the file size by much; compression works really well on blocks of solid color.)

    I can hardly imagine a good reason to do this, though.

    Update :

    Based on your comment, this answers the question you asked, but almost certainly won’t address your actual problem. You haven’t given us enough information to guess how to do that.

    This is a classic XY problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to pad a repeating background image that will not also
Is there an easier way to calculate yesterday in Bash? This code (used for
Is there way to set @include mixin(); to variable? I tried this @mixin bg-gradient($fallback,
Is there a way to customize the iphone keyboard? Say I want the number
Is there some way to keep a set width/height for a DIV, and pad
Is there some easy way to pad Strings in Java? Seems like something that
Is there any way to get the location that touch pad is touched? also
Is there a way I can have a pad refresh to any window instead
I have a sketch pad made in Flash AS3 like this one here: http://henryjones.us/articles/using-the-as3-jpeg-encoder
Is there way to get file from windows xp command prompt? I tried to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.