Author Topic: Resize to MB..  (Read 12251 times)

Offline Junction10

  • Member
  • **
  • Posts: 66
    • View Profile
    • Junction10 Photography
Resize to MB..
« on: February 08, 2009, 09:19:34 AM »
I know this has been mentioned in a previous thread:
http://forums.camerabits.com/index.php?topic=3020.0

..  I too have the requirement to send images to certain picture desks at a specific size - in my case, 7mb uncompressed. 

I have a script that does this in Photoshop, and it's a very simple calculation, so should be easily implemented in PhotoMechanic..  Working out the compressed size would be more difficult because it would vary based on the content of the image, but working out the uncompressed size is a doddle, since it's only based on width, height, number of channels, and the bit-depth...

Any chance of this? 

J
iMac 27" 5K Retina 2017 -  4.2ghz 64gb RAM 1Tb HD, OSX Mojave
MacBook Pro 16" M1 Max 24 core GPU, 2Tb SSD, 64gb RAM

https://www.junction10.photography/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Resize to MB..
« Reply #1 on: February 08, 2009, 10:20:37 AM »
I know this has been mentioned in a previous thread:
http://forums.camerabits.com/index.php?topic=3020.0

..  I too have the requirement to send images to certain picture desks at a specific size - in my case, 7mb uncompressed. 

I have a script that does this in Photoshop, and it's a very simple calculation, so should be easily implemented in PhotoMechanic..  Working out the compressed size would be more difficult because it would vary based on the content of the image, but working out the uncompressed size is a doddle, since it's only based on width, height, number of channels, and the bit-depth...

It seems that for your needs no feature needs to be added since a simple calculator would suffice.  Width x Height x (bitdepth / 8 ) will give you the uncompressed size.  Since PM only saves out as 24-bits, the only variables are the Width and Height. (Width x Height x 3)  Of course that doesn't take into consideration additional data needs for metadata, file format data, etc.

-Kirk
« Last Edit: February 08, 2009, 01:26:40 PM by Kirk Baker »

Offline Junction10

  • Member
  • **
  • Posts: 66
    • View Profile
    • Junction10 Photography
Re: Resize to MB..
« Reply #2 on: February 08, 2009, 12:35:43 PM »
Hi kirk,

I think there's a bit of confusion with what I mean..  I'm not talking about the actual file size, but the amount of memory the image takes up... If you load a jpg file into photoshop for example, and it's only 3 or 4mb of disk space, you'll see photoshop might report it as a 20 or 30mb image.

Using a calculator would not be useful, because the best time to resize the image before uploading or emailing is after the crop has been applied, so that's a variable to consider.
I'll pm you the photoshop script when I get back from this shoot and you can see what I mean.  The resulting file sizes are usually between 500k and 1.2mb compressed, but the image size is always bang on 7mb uncompressed, and guaranteed not to explode the newspaper's library.  It also doesn't matter what the width and height are, the script always resides in proportion.
I have a similar plugin for lightroom which will resize to the total number of pixels, which is effectively the same, but you have to work out the bit depth and mb yourself... Which to get a standard 7mb uncompressed) 8bit rgb file is (from memory so I'll have to double check), 1024x1024x7x3

I'll post script later

J
iMac 27" 5K Retina 2017 -  4.2ghz 64gb RAM 1Tb HD, OSX Mojave
MacBook Pro 16" M1 Max 24 core GPU, 2Tb SSD, 64gb RAM

https://www.junction10.photography/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Resize to MB..
« Reply #3 on: February 08, 2009, 01:32:27 PM »
I think there's a bit of confusion with what I mean..  I'm not talking about the actual file size, but the amount of memory the image takes up... If you load a jpg file into photoshop for example, and it's only 3 or 4mb of disk space, you'll see photoshop might report it as a 20 or 30mb image.

Using a calculator would not be useful, because the best time to resize the image before uploading or emailing is after the crop has been applied, so that's a variable to consider.
I'll pm you the photoshop script when I get back from this shoot and you can see what I mean.  The resulting file sizes are usually between 500k and 1.2mb compressed, but the image size is always bang on 7mb uncompressed, and guaranteed not to explode the newspaper's library.  It also doesn't matter what the width and height are, the script always resides in proportion.
I have a similar plugin for lightroom which will resize to the total number of pixels, which is effectively the same, but you have to work out the bit depth and mb yourself... Which to get a standard 7mb uncompressed) 8bit rgb file is (from memory so I'll have to double check), 1024x1024x7x3

I understood you completely.  The image width times the image height, times 3 will give you the uncompressed image size.  So you should be able to save an image at 2000x1200 and be about 7MB uncompressed.  Just set your Scale size at 2000 pixels and you should be in the ballpark.

-Kirk
« Last Edit: February 08, 2009, 01:35:44 PM by Kirk Baker »

Offline Brendan

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
Re: Resize to MB..
« Reply #4 on: February 10, 2009, 04:34:36 AM »
how about subsample chroma? its not normal to send uncompressed JPGs.

I think its not a big work, but it makes life ( & work with PM) even more easier :)


Brendan
using the latest version of PM on win10

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Resize to MB..
« Reply #5 on: February 10, 2009, 06:20:16 AM »
Brendan,

how about subsample chroma? its not normal to send uncompressed JPGs.

I think its not a big work, but it makes life ( & work with PM) even more easier :)

I don't understand what you're saying.  There already is an option to apply or not apply chrominance subsampling.

-Kirk

Offline Brendan

  • Sr. Member
  • ****
  • Posts: 358
    • View Profile
Re: Resize to MB..
« Reply #6 on: February 10, 2009, 06:26:33 AM »
yes it is.

but how to calculate with this (compressed)?


for uncompressed JPG u told us already:


The image width times the image height, times 3 will give you the uncompressed image size.  So you should be able to save an image at 2000x1200 and be about 7MB uncompressed.  Just set your Scale size at 2000 pixels and you should be in the ballpark.
using the latest version of PM on win10

Offline Junction10

  • Member
  • **
  • Posts: 66
    • View Profile
    • Junction10 Photography
Re: Resize to MB..
« Reply #7 on: February 10, 2009, 06:47:16 AM »
I understood you completely.  The image width times the image height, times 3 will give you the uncompressed image size.  So you should be able to save an image at 2000x1200 and be about 7MB uncompressed.  Just set your Scale size at 2000 pixels and you should be in the ballpark.


But that's like having in the email images output screen, an option to resize 'Large : 'about' 640 pixels longest width...

It's not exact..  it's 'about' ..  sometimes, you may need to be exact on the uncompressed size, either for a file library, competition submission etc.

Also, if I scale an image to 2000px along the longest size, what if it's only 200px along the shortest side?  It's going to be nowhere near 7mb uncompressed...

J.


iMac 27" 5K Retina 2017 -  4.2ghz 64gb RAM 1Tb HD, OSX Mojave
MacBook Pro 16" M1 Max 24 core GPU, 2Tb SSD, 64gb RAM

https://www.junction10.photography/

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Resize to MB..
« Reply #8 on: February 10, 2009, 07:09:52 AM »
I understood you completely.  The image width times the image height, times 3 will give you the uncompressed image size.  So you should be able to save an image at 2000x1200 and be about 7MB uncompressed.  Just set your Scale size at 2000 pixels and you should be in the ballpark.


But that's like having in the email images output screen, an option to resize 'Large : 'about' 640 pixels longest width...

It's not exact..  it's 'about' ..  sometimes, you may need to be exact on the uncompressed size, either for a file library, competition submission etc.

Also, if I scale an image to 2000px along the longest size, what if it's only 200px along the shortest side?  It's going to be nowhere near 7mb uncompressed...

OK.  All I can promise is that we'll consider your feature request and if it meets our criteria for implementation, it will be implemented in a future version of Photo Mechanic.

-Kirk

Offline Junction10

  • Member
  • **
  • Posts: 66
    • View Profile
    • Junction10 Photography
Re: Resize to MB..
« Reply #9 on: February 10, 2009, 07:27:47 AM »
Thanks Kirk,

I've PM'd you the Photoshop script - my calculation was wrong above..  memory not what it used to be.

Best regards,

J
iMac 27" 5K Retina 2017 -  4.2ghz 64gb RAM 1Tb HD, OSX Mojave
MacBook Pro 16" M1 Max 24 core GPU, 2Tb SSD, 64gb RAM

https://www.junction10.photography/

Offline jonmcg

  • Member
  • **
  • Posts: 54
    • View Profile
Re: Resize to MB..
« Reply #10 on: July 10, 2010, 04:16:17 AM »
I also would like this feature, basically (for me) it is the bdsizer "Restrict Size" option. The only thing wrong with bdsizer for me is it cannot cope with none standard font sizes and hence I cannot get at some of the options as you cannot resize the sub windows (so far they have ignored requests to fix this problem). It is also quite slow with large files, PM is much faster at rezing large files.