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

  • Home
  • SEARCH
  • 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 499019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:56:33+00:00 2026-05-13T05:56:33+00:00

For a network experiment I am conducting, I require image files of arbitrary size.

  • 0

For a network experiment I am conducting, I require image files of arbitrary size.

I am lost on how to create such files. I require 5MB, 10MB and 20MB files in JPEG, PNG and PDF format.

In my first attempt at generating these files it became clear that due to the compression schemes of these formats, it’s not possible (or at least I don’t know how) to generate files of arbitrary size by just specifying resolution of blank files.

Is there a quick (programmatic?) method by which I could generate these files?

Edit: I am investigating creating arbitrarily sized dummy files, but if there is a way to create actual JPEG, PNGs or PDFs that have the correct internal format, that would be ideal.

  • 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-05-13T05:56:34+00:00Added an answer on May 13, 2026 at 5:56 am

    The resolution doesn’t change the number of pixels, just the display size of a pixel — increasing resolution makes the display larger, but doesn’t make the file larger.

    If you make a JPEG that repeats the same information over and over again it will get bigger — the compression is on a 8×8 cell basis — if you have more cells, you’ll have more data. To make them bigger, encode with quality set to 100. Another thing, JPEG strips out luminance on a cell basis, so variation in hue compresses worse than variation in luminance.

    I used my company’s product, DotImage, to create a 10mb jpg with this code. You could download an eval and try it out, or do the same with your image SDK.

    using System;
    using System.Drawing;
    using Atalasoft.Imaging;
    using Atalasoft.Imaging.Codec;
    using Atalasoft.Imaging.Drawing;
    
    namespace MakeLargeImage
    {
        class Program
        {
            static void Main(string[] args)
            {
                AtalaImage img = new AtalaImage(1000, 8000, PixelFormat.Pixel24bppBgr);
                Canvas c = new Canvas(img);
    
                for (int block = 0; block < img.Height; block += 1000)
                {
                    for (int line = 0; line < 1000; line += 4)
                    {
                        int y = block + line;
                        c.DrawLine(new Point(0, y), new Point(img.Width, block), new AtalaPen(Color.Yellow));
                        c.DrawLine(new Point(0, y + 1), new Point(img.Width, y + 1), new AtalaPen(Color.Red));
                        c.DrawLine(new Point(0, y + 2), new Point(img.Width, y + 2), new AtalaPen(Color.Green));
                        c.DrawLine(new Point(0, block), new Point(img.Width, y + 3), new AtalaPen(Color.Blue));
                    }
                }
                JpegEncoder jpeg = new JpegEncoder(100);
                img.Save("10mb.jpg", jpeg, null);
            }
        }
    }
    

    If you make the image pixel size larger, the JPEG file will get larger. You could also add in meta-data, but it’s hard to get a big file with just meta-data as there are some size limitations.

    PDF is the easiest — just make a big page with uncompressed image and keep adding pages — it will get big fast — there’s no compression unless you turn it on. You can do this easily in DotImage with the PdfEncoder — just give it a list of jpgs in a FileSystemImageSource — code not shown as to not bore everyone, but I’d be happy to provide it to anyone that wants it — just call Atalasoft and ask for me (or open a support case and reference this question.

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

Sidebar

Ask A Question

Stats

  • Questions 234k
  • Answers 234k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Add the -expandproperty parameter to the select-object cmdlet. excerpt: $data1… May 13, 2026 at 5:57 am
  • Editorial Team
    Editorial Team added an answer By prefixing the call to answerToLifeUniverseAndEverything() with new you are… May 13, 2026 at 5:57 am
  • Editorial Team
    Editorial Team added an answer I don't see the problem. I created a test table… May 13, 2026 at 5:57 am

Related Questions

I am writing a simple web service using .NET, one method is used to
I'm starting to experiment with CouchDB because it looks like the perfect solution for
For 6 years I've had a random number generator page on my website. For
Which models of algorithm running time exist? We all expect mergesort to be faster
Okay, so this is a straight math question and I read up on meta

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.