How to calculate the pixel dimension when the givens are aspect ratio and megapixels?

filmrescue

Leading Member
Messages
935
Reaction score
71
Location
US
When I Google this, I do get different calculators but none that allow me to enter the aspect ratio and required megapixels and get a pixel dimension for the frame. Or alternately, is there a formula other than trial and error?

For instance an easy one - if I want to output 30 megapixels on a 1:1 aspect ratio I would need a frame the pixel dimension that is the square root of 30 000 000 which would be about 5477 x 5477 pixels

But how would I calculate that for 2:3, 5:4, 16:9 or 4:3 aspect ratio beyond trial and error?

For the why of this - We're digitizing many different aspect ratios of film with a Phase One IQ4 150 mp achromatic camera and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels. The traditional file size that has been used in the past makes no sense because it's so variable depending on file type, mode and compression
 
If you express the aspect ratio as a:b (e.g. for a 3:2 ratio a=3 and b=2) and the megapixellation as m, then width = sqrt(m*a/b) and height = sqrt(m*b/a).

This will give you dimension in megapixels, multiply to get pixels.

--
Anybody who isn't confused does not really understand what's going on.
 
Last edited:
When I Google this, I do get different calculators but none that allow me to enter the aspect ratio and required megapixels and get a pixel dimension for the frame. Or alternately, is there a formula other than trial and error?
For instance an easy one - if I want to output 30 megapixels on a 1:1 aspect ratio I would need a frame the pixel dimension that is the square root of 30 000 000 which would be about 5477 x 5477 pixels

But how would I calculate that for 2:3, 5:4, 16:9 or 4:3 aspect ratio beyond trial and error?
Since megapixels = the number of pixels on the Horizontal axis x number of pixels on the vertical axis, the megapixel count of your camera-scanned duplicates will depend on how much area on the sensor the original you are duplicating occupies. A film format whose height and width ratio fits closely to the HxW of the sensor will have more megapixels than when the short dimension of the film original occupies less of the sensor area in order to also cover the original's long dimension. (assuming you aren't scanning in sections at higher magnifications or locking down the magnification ratio based on the longest dimension of the largest film format you’ll be duplicating and never changing the lens or moving the camera,)
For the why of this - We're digitizing many different aspect ratios of film with a Phase One IQ4 150 mp achromatic camera and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels. The traditional file size that has been used in the past makes no sense because it's so variable depending on file type, mode and compression
I think a smarter approach is to offer a flat price, regardless of the original film format. I suggest this approach as the amount of time and work to handle (clean, mount, and re-sleeve) each piece of film is going to be roughly the same. I also suggest you include in that price an allowance for how much post-capture work time you think the average scan will require for a basic cleanup of dust, scratches, and film emulsion defects.

which lens will you be using?

--
Ellis Vener
To see my work, please visit http://www.ellisvener.com
I am on Instagram @EllisVenerStudio
“It's not about the f-stop." -Jay Maisel
 
Last edited:
... For the why of this - We're digitizing many different aspect ratios of film with a Phase One IQ4 150 mp achromatic camera and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels.
I hope you'll also point out to customers that a 30MP+ capture from a 135 frame is not going to match the usable resolution of the same pixel count capture from a 6x9 frame.
 
Last edited:
take the total megapixels and divide by the aspect ratio, now you know how many pixels would be in a square image and you know how to solve that one

for instance my D3300 provides exactly 24,000,000 pixels and has 3:2 aspect ratio. Divide 24000000 by (3/2) and I get 16000000 for a square which equals 4000 on a side which is the number on the shortest side. to get the longer side I multiply by the aspect ratio so 4000 times (3/2) and I get 6000. The D3300 is stated to be 4000 x 6000.
 
take the total megapixels and divide by the aspect ratio, now you know how many pixels would be in a square image and you know how to solve that one

for instance my D3300 provides exactly 24,000,000 pixels and has 3:2 aspect ratio. Divide 24000000 by (3/2) and I get 16000000 for a square which equals 4000 on a side which is the number on the shortest side. to get the longer side I multiply by the aspect ratio so 4000 times (3/2) and I get 6000. The D3300 is stated to be 4000 x 6000.
Cool!...Yeah, I couldn't sleep last night and figured it out. simply divide the your frame into equal size squares and then take the square root to figure out the pixel dimension.

For example...

Start with the aspect ratio, let's say it's 3:2. Multiply 3 x 2 to give you 6 equal size squares. Now let's say you want a 3 megapixel image. 3 million divided by 6 equals 6 squares of 500 000 pixels. The square route of 500 000 is 707 making each square in the frame 707 x 707. From there multiply by the aspect ratio to get pixel dimension. 3 x 707 = 2121. 2 x 707 = 1414. Pixels dimension is 2121 x 1414 for a 3 megapixel frame. Proof...2121 x 1414 = 2 999 094 or rounded to 3 megapixels.
 
If you express the aspect ratio as a:b (e.g. for a 3:2 ratio a=3 and b=2) and the megapixellation as m, then width = sqrt(m*a/b) and height = sqrt(m*b/a).

This will give you dimension in megapixels, multiply to get pixels.
I'm not sure I understand this. could you give me a layed out for instance. Or if not, I have a method now for figuring this but I don't know how to write it down is a math formula.

By dividing the frame into equal size squares, I can use square root to figure out the pixel dimension of each of those squares and come to the pixel dimension of the entire frame...maybe that's what you're already indicating but I don't understand it as a formula as you present it. I'm to far removed from my high school math at this point 😥
 
When I Google this, I do get different calculators but none that allow me to enter the aspect ratio and required megapixels and get a pixel dimension for the frame. Or alternately, is there a formula other than trial and error?
For instance an easy one - if I want to output 30 megapixels on a 1:1 aspect ratio I would need a frame the pixel dimension that is the square root of 30 000 000 which would be about 5477 x 5477 pixels

But how would I calculate that for 2:3, 5:4, 16:9 or 4:3 aspect ratio beyond trial and error?
Since megapixels = the number of pixels on the Horizontal axis x number of pixels on the vertical axis, the megapixel count of your camera-scanned duplicates will depend on how much area on the sensor the original you are duplicating occupies. A film format whose height and width ratio fits closely to the HxW of the sensor will have more megapixels than when the short dimension of the film original occupies less of the sensor area in order to also cover the original's long dimension. (assuming you aren't scanning in sections at higher magnifications or locking down the magnification ratio based on the longest dimension of the largest film format you’ll be duplicating and never changing the lens or moving the camera,)
For the why of this - We're digitizing many different aspect ratios of film with a Phase One IQ4 150 mp achromatic camera and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels. The traditional file size that has been used in the past makes no sense because it's so variable depending on file type, mode and compression
I think a smarter approach is to offer a flat price, regardless of the original film format. I suggest this approach as the amount of time and work to handle (clean, mount, and re-sleeve) each piece of film is going to be roughly the same. I also suggest you include in that price an allowance for how much post-capture work time you think the average scan will require for a basic cleanup of dust, scratches, and film emulsion defects.

which lens will you be using?
Thanks Ellis

Yes, I understand that it will depend on how much of the sensor we utilize but in most cases, the input resolution is going to be smaller than the output resolution simply for practical purposes. We digitize a lot of smaller stuff here but to go to the extreme, with a disc film frame, there is no reason to have such a huge magapixel file, as fun and quirky as that may be.

Yes...for sure a flat rate would be great but at the same time, we're struggling with giving up on the mom and pop work which would be delivered as smaller files

The lens...

Cambo Inspect.x L 105mm F5.6 Float lens
 
take the total megapixels and divide by the aspect ratio, now you know how many pixels would be in a square image and you know how to solve that one

for instance my D3300 provides exactly 24,000,000 pixels and has 3:2 aspect ratio. Divide 24000000 by (3/2) and I get 16000000 for a square which equals 4000 on a side which is the number on the shortest side. to get the longer side I multiply by the aspect ratio so 4000 times (3/2) and I get 6000. The D3300 is stated to be 4000 x 6000.
Cool!...Yeah, I couldn't sleep last night and figured it out. simply divide the your frame into equal size squares and then take the square root to figure out the pixel dimension.

For example...

Start with the aspect ratio, let's say it's 3:2. Multiply 3 x 2 to give you 6 equal size squares. Now let's say you want a 3 megapixel image. 3 million divided by 6 equals 6 squares of 500 000 pixels. The square route of 500 000 is 707 making each square in the frame 707 x 707. From there multiply by the aspect ratio to get pixel dimension. 3 x 707 = 2121. 2 x 707 = 1414. Pixels dimension is 2121 x 1414 for a 3 megapixel frame. Proof...2121 x 1414 = 2 999 094 or rounded to 3 megapixels.
You can't worry too much about a few pixels here or there, the math is usually not that accurate. I don't know why sensors are made with unusual dimensions anyway. My D3300 however is exactly 4000 x 6000.
 
When I Google this, I do get different calculators but none that allow me to enter the aspect ratio and required megapixels and get a pixel dimension for the frame. Or alternately, is there a formula other than trial and error?
For instance an easy one - if I want to output 30 megapixels on a 1:1 aspect ratio I would need a frame the pixel dimension that is the square root of 30 000 000 which would be about 5477 x 5477 pixels

But how would I calculate that for 2:3, 5:4, 16:9 or 4:3 aspect ratio beyond trial and error?
Since megapixels = the number of pixels on the Horizontal axis x number of pixels on the vertical axis, the megapixel count of your camera-scanned duplicates will depend on how much area on the sensor the original you are duplicating occupies. A film format whose height and width ratio fits closely to the HxW of the sensor will have more megapixels than when the short dimension of the film original occupies less of the sensor area in order to also cover the original's long dimension. (assuming you aren't scanning in sections at higher magnifications or locking down the magnification ratio based on the longest dimension of the largest film format you’ll be duplicating and never changing the lens or moving the camera,)
For the why of this - We're digitizing many different aspect ratios of film with a Phase One IQ4 150 mp achromatic camera and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels. The traditional file size that has been used in the past makes no sense because it's so variable depending on file type, mode and compression
I think a smarter approach is to offer a flat price, regardless of the original film format. I suggest this approach as the amount of time and work to handle (clean, mount, and re-sleeve) each piece of film is going to be roughly the same. I also suggest you include in that price an allowance for how much post-capture work time you think the average scan will require for a basic cleanup of dust, scratches, and film emulsion defects.

which lens will you be using?
Thanks Ellis

Yes, I understand that it will depend on how much of the sensor we utilize but in most cases, the input resolution is going to be smaller than the output resolution simply for practical purposes. We digitize a lot of smaller stuff here but to go to the extreme, with a disc film frame, there is no reason to have such a huge magapixel file, as fun and quirky as that may be.
this seems to be a different question than the one I thought you were asking. I was focusing on input resolution.

sure you can charge a premium for delivering higher resolution or larger files.
what pricing structure are you considering?

T
Yes...for sure a flat rate would be great but at the same time, we're struggling with giving up on the mom and pop work which would be delivered as smaller files
The lens...

Cambo Inspect.x L 105mm F5.6 Float lens
that is an excellent lens.
 
For instance an easy one - if I want to output 30 megapixels on a 1:1 aspect ratio I would need a frame the pixel dimension that is the square root of 30 000 000 which would be about 5477 x 5477 pixels
But how would I calculate that for 2:3, 5:4, 16:9 or 4:3 aspect ratio beyond trial and error?
The 1:1 aspect establishes the height of your standard scan. To determine the width pixel dimension for other aspect films, multiply 5477 by the simplified aspect. (numbers are rounded to the nearest whole)
  • 1:1 = 1:1 = 5477 × 5477
  • 3:2 = 1.5:1 = 8216 × 5477
  • 4:3 = 1.33:1 = 7303 × 5477
  • 5:4 = 1.25:1 = 6846 × 5477
  • 16:9 = 1.78:1 = 9737 × 5477
For the why of this - We're digitizing many different aspect ratios of film with a Phase One IQ4 150 mp achromatic camera and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels.
The IQ4 150MP sensor is 14204 × 10652 pixels. That's a simplified ratio of 1.33:1. A height of 10652 pixels can be applied to your premium quality scans of 1:1, 1.25:1, and 1.33:1 scans. Multiply 10652 by the simplified ratios.

The other aspects can't make full use of the IQ4 sensor height but could make full use of its width. Divide 14204 by the simplified aspect to get the dimension.
  • 3:2 = 1.5:1 = 14204 × 9469
  • 16:9 = 1.78:1 = 14204 × 7980
The traditional file size that has been used in the past makes no sense because it's so variable depending on file type, mode and compression.
The size of the file that's delivered to the customer is up to you to determine and will be impacted by the file type the customer chooses: JPEG, PNG, DNG, TIFF, etc.

--
Bill Ferris Photography
Flagstaff, AZ
 
Last edited:
Easy for an Engineer to understand but not easy for someone who doesn't use basic Algebra every day.

First question to answer. What is the resolution of the camera you are using. Easy to find on Google and it's 14204 x 10652. So you have a horizontal baseline of 14,204 pixels and an aspect ration of 4 x 3.

This means that 1 x 1 and 4 x 5 aspects will be restrained by the height of the frame because they are "taller" than your native aspect ratio. As a result you have to work with 2 equations or set up an Excel spreadsheet that uses the aspect ratio to determine which equation to apply. I will also note that 1 mp is equal to 1 Million Pixels so to make it easy just place 6 zero's behind your mp number to keep it simple. So 24mp = 24,000,000 pixels.

Equation One Note the total pixels (24,000,000). Then you have the original aspect ratio of the image. Lets call the short side "X" and the long side is "x" times the aspect ratio inverted. So for a 2 x 3 aspect ratio the formula is "x" times "1.5 * X. This results in a new equation that is Mp = 1.5 times X squared, which can be re-written as Mp/1.5 = X squared.

This means that X = the square root of the Mp divided by 1.5. For 24mp this works out to X equaling 4000 pixels. This means an image resolution of 6000 x 4000 pixels. Now because those 6000 pixels are projected onto a 14,204 pixel wide sensor the magnification ratio is 14,204/6000 is 2.367. Thus the new image resolution will be 14,204 x 9469.

Equation Two. The equation here is the same Mp/Inverted Aspect Ratio = X Squared. For a 4 x 5 aspect ratio this would be Mp/1.2 = X Squared. So take the square root of Mp/1.2 and that becomes the Short Side dimension. In this case 10,652 pixels. The long side will become 12,782 pixels because it's 1.2 times the short side resolution.

To make it real easy if you know someone who is very familiar with Excel they can take this post and build a spread sheet that will automatically determine the final resolution of any image size and aspect ratio. I'm am not going to do that because I am NOT an Excel expert and it would take me about 3 hours to do what an expert can do in about 5 minutes.
 
You can't because the sensor size is missing. Obviously, pixel dimensions depend on it.
 
You can't because the sensor size is missing. Obviously, pixel dimensions depend on it.
Yes all this discussion is relative to numbers of pixels, not actual dimensions. I don't know if enough information is available to actually calculate the dimensions of pixels, we can just calculate the spacing between them or the maximum size that they could be.
 
You can't because the sensor size is missing. Obviously, pixel dimensions depend on it.
Yes all this discussion is relative to numbers of pixels, not actual dimensions. I don't know if enough information is available to actually calculate the dimensions of pixels, we can just calculate the spacing between them or the maximum size that they could be.
knowing the pixel pitch - the distance between any single pixel and its neighbor - is 100% irrelevant to the questions FilmRescue asked. There are two parts to that question:

1. "**But how would I calculate that for 2:3, 5:4, 16:9 or 4:3 aspect ratio beyond trial and error?** For the why of this - We're digitizing many different aspect ratios of film with a Phase One IQ4 150 mp achromatic camera

We know the number of active pixels ( the technical term that describes the pixels used to in recording an image) i nthe sensor in the XF150 back is 14204 x 10652. What matters is what how much of the sensor's area will any of these formats fill. That needs to be determined by FilmRescue based on how they are going to go about usign the camera to duplicate those film formats.

One of the variables will be whether they will set up the camera just once to accommodate the largest piece of film they will duplicate and then use progressively smaller areas for smaller formats or will they adjust the camera's magnification ratio so the long side of a frame of the film just fits into the sensor? The latter approach obviously takes more effort and time.

2.) and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels."

That is a business question. it's tied to the question of how they will be making the digital dupes. The more work they have to do, the more resources used, the more they should charge. Without knowing their cost of business or clientele, none of us can answer it.

--
Ellis Vener
To see my work, please visit http://www.ellisvener.com
I am on Instagram @EllisVenerStudio
“It's not about the f-stop." -Jay Maisel
 
Last edited:
You can't
You can. Two ways to do so were described weeks ago.
because the sensor size is missing.
The sensor size is not missing. The camera to be used is mentioned in the first post. And even if the sensor size were unknown, the calculation methods will work.
Obviously, pixel dimensions depend on it.
I'm not sure you understand what the OP means by pixel dimensions. Maybe re-read.

'if I want to output 30 megapixels on a 1:1 aspect ratio I would need a frame the pixel dimension that is the square root of 30 000 000 which would be about 5477 x 5477 pixels. But how would I calculate that for 2:3, 5:4, 16:9 or 4:3 aspect ratio beyond trial and error?

In other words:

The pixel dimensions of a 30MP image with a 1:1 aspect ratio are about 5477 x 5477.

What are the pixel dimensions of a 30MP image with a 2:3 aspect ratio?

What are the pixel dimensions of a 30MP image with a 5:4 aspect ratio?

What are the pixel dimensions of a 30MP image with a 16:9 aspect ratio?

What are the pixel dimensions of a 30MP image with a 4:3 aspect ratio?
 
Last edited:
2.) and we want to offer different resolutions at different prices but want to express the resolution on what is most understandable to people which is megapixels."

That is a business question. it's tied to the question of how they will be making the digital dupes. The more work they have to do, the more resources used, the more they should charge. Without knowing their cost of business or clientele, none of us can answer it.
The business aspect of the OP's question is what prompted me to respond as I did. Defining the service as providing customers a scan that maintains the aspect ratio of the original image but uses only enough of the scanner's sensor to cover 30 megapixels seems punitive to customers sending images having aspect ratios other than 1:1 and makes the scanning process more complex than it needs to be. In short, it increases the cost of doing business and provides inconsistent quality of service.

If they adopt the approach I describe, they're maximizing quality of service to the customer (a marketing advantage) simplifying operations (a cost of doing business advantage) and still giving themselves options in the quality of product delivered across their rate card.

It also creates an opportunity for followup business. If a customer pays for a "Basic" quality scan, thats the size that they deliver from the original scan. If that same customer decides to order a larger, higher res scan from the same original in the future, the archived file was made at the maximum quality their equipment could deliver. That followup sale can be delivered with minimal additional work.
 
Here's a very simple spreadsheet to calculate what you want. Put in the number of megapixels and the aspect ratio and it will return the height & width.

Link to the spreadsheet

It looks like this: - just fill out the bits in yellow.

I've assumed 1 megapixel is 1024*1024. Change that number if it's not correct.



8759e15d604346689e7bc5bafa85c5bb.jpg.png

Enjoy

Alan



--
Try www.the-photo.org for a community-run creative photography resource
where we focus on images. Now with portfolios. Part of the dprevived.com community.
 
Here's a very simple spreadsheet to calculate what you want. Put in the number of megapixels and the aspect ratio and it will return the height & width.

Link to the spreadsheet

It looks like this: - just fill out the bits in yellow.

I've assumed 1 megapixel is 1024*1024. Change that number if it's not correct.

8759e15d604346689e7bc5bafa85c5bb.jpg.png

Enjoy

Alan


that gives you the number of rows and columns of pixels, not the actual dimensions of each pixel



these all have the same aspect ration, yet each pixel size would be vary different:



4 mm by 3 mm

4 feet by 3 feet

40 feet x 30 feet



cameras that let you specify the aspect ratio of the image to take do so by ignoring any excess pixels (since obviously it can't change the actual physical size of the sensors/pixels)



that's why some people always shoot images at the max ratio the camera allows and then later use software to crop the image to the desired aspect ratio
 

Keyboard shortcuts

Back
Top