Opera Widgets の開発は現在行われておりません。詳細を見る

ログイン| 新規登録

Opera Software ASA

image size, Opera application V1.0 2007/03/01 17:38:23

Calculate the size of an image, depending on its dimensions, compression and color depth.


コメント 3 通

ページのトップからログインしコメントする

1 - 3 中 3

Oops, my previous comment seems to have gotten cut off, probably because of a limit on the post length. It was supposed to end with the words:

"even if you don't see this reply, perhaps it will be helpful to someone.
Just to be clear though, I have no connection to the author."

Isildur 作 , # 2009/01/21 6:32:14

seremina, there's no particular picture in question, because the widget is just be for giving you a ballpark figure of what a hypothetical image's file size would likely be, based on the parameters you enter.

The calculation is Width x Height x compressionRate x (BitDepth/8) x (1/1024) = #KB
("1/1024" because there are 1024 bytes in a kilobyte, "Bitdepth/8" because there are 8 bits to a byte)

For JPEG it assumes a rate of 1/10, for PNG a ratio of1/2, for GIF a ratio of1/3, and plain bitmaps are uncompressed (1/1). You can readjust the compression rate though.

A problem however, is that in reality the filesize of compressed images can vary enormously depending on the complexity of the contents. For example, If you make a PNG image with nothing but some horizontal stripes of various solid colors, you can easily get an extreme compressed:uncompressed ratio, like 1:876 for this picture:
http://img101.imageshack.us/img101/6941/test2yf8.png. Also, compression rates can often be adjusted.

That said, I think this widget still can be useful for certain kinds of pictures.

Hm, now that I look, I see your comment was posted nearly a year ago; even if you don't see this reply, perhaps it will clarify things for someone else.

Note: I have no connection to the author, so no one should message me about the widget.

Isildur 作 , # 2009/01/20 21:26:41

Do you show it the picture in question by a virtual upload and it tells you? The description isn't long enough to fully explain all this widget is for.

seremina 作 , # 2008/02/25 2:19:40