スーパマーケット N 町店の広報スタッフである D さんは,本社の Web サイト担当の E さんと協力して N 町店紹介のページを作成している。このたび,N 町店紹介のページのアクセス数増加を目的として,Web サイトで懸賞付きアンケートを実施することになった。D さんは,図 1 のような懸賞ページ案を作成し,E さんに相談した。 D さんは,懸賞ページ案を確認した E さんから,次のようなアドバイスと指示を受けた。 〔デザインに関する主なアドバイス〕 (1) マウスでの入力など,操作性の良い入力方法を採用する。 (2) 回答などの操作がしやすい順序に,入力領域やボタンを配置する。 (3) 入力の誤りを防ぐため,データ形式に応じた入力フォームを利用する。 〔作成に関する主な指示〕 (1) 懸賞ページは HTML 形式の ank01.html というファイル名で作成し,Web サーバの指定されたディレクトリに転送する。 (2) ファイルを指定する場合は,相対パスで記述する。 (3) 使用する写真のファイルサイズは,1 枚当たり 200k バイト以下とする。 D さんは, 賞品を製造しているメーカの許可を受けて, メーカのカタログから賞品の写真をイメージスキャナで取り込み, 懸賞ページに掲載することにした。写真 1 枚は縦 5 cm×横 7.5 cm で, 24 ビットカラーのビットマップ形式で取り込み, フォトレタッチソフトで編集する。 フォトレタッチソフトでの画像の圧縮を考えないものとするとき, E さんの指示に従って, 次の設定の中で D さんが設定できる最も高いイメージスキャナの解像度はどれか。ここで, 5cm×7.5cm は, 2 インチ×3 インチとして計算する。
平成23年度 特別試験 ITパスポート試験 問98
This question's explanation and your answers so far.
問 98
※ Our check while writing this explanation could not fully confirm the published answer; scoring follows IPA's official key.
Incorrectア
At 60dpi the data size is 18 × 60² = 64,800 bytes, which does indeed satisfy the instruction of 200k bytes or less. However, what the question asks for is the “highest” resolution among those that satisfy the condition, and above 60dpi there is still 100dpi (180,000 bytes), which also satisfies it. Choosing 60dpi lowers the resolution more than necessary, making the prize photos that are posted coarse and worse in image quality. This is the wrong answer that results from missing the intent of the question, which is to choose the largest value that meets the limit.
- イ
正解 The correct answer is イ (100dpi). The basis for the judgment is the instruction given by Mr. E in the shared case text, 〔Main instructions for the work〕(3): the file size of each photo used must be 200k bytes or less. In a bitmap format where compression is not considered, the file size is determined directly by the number of pixels × the number of bytes per pixel, so you only need to compute the data size at each resolution and choose the highest resolution that stays within 200k bytes. First, find the size of one pixel. 24-bit color means the color of one pixel is represented with 24 bits, so 24 ÷ 8 = 3 bytes per pixel. Next, find the number of pixels. Since dpi (dots per inch) is the number of pixels per inch, if the resolution is R dpi, the 2-inch height becomes 2R pixels and the 3-inch width becomes 3R pixels, for a total of 2R × 3R = 6R² pixels. The data size is therefore 6R² × 3 = 18R² bytes. Substituting each choice into this formula: 60dpi gives 18 × 60² = 64,800 bytes, 100dpi gives 18 × 100² = 180,000 bytes, 300dpi gives 18 × 300² = 1,620,000 bytes, and 1,200dpi gives 18 × 1200² = 25,920,000 bytes. Only 60dpi and 100dpi satisfy the condition of 200k bytes (= 200,000 bytes) or less; 300dpi and above exceed it by an order of magnitude. What is asked is the “highest” resolution among those that satisfy the condition, so the answer is 100dpi, that is イ. The key point is to grasp that resolution and data size are related by a square: doubling the resolution doubles both the height and the width, so the number of pixels becomes 4 times and the data size also becomes 4 times.
Incorrectウ
At 300dpi the image is 600 pixels tall × 900 pixels wide = 540,000 pixels, and the data size is 540,000 × 3 = 1,620,000 bytes, about 8 times the instructed limit of 200k bytes or less. Because 300dpi is well known as a standard resolution for printing, it is easy to pick it from a general sense of familiar numbers without calculating, but this question must be judged purely by whether the file-size limit specified by Mr. E is met. Note also that even if you mistake the 3 bytes per pixel for 1 byte, the result is 540,000 bytes, which still exceeds the limit.
Incorrectエ
At 1,200dpi the image is 2,400 pixels tall × 3,600 pixels wide = 8,640,000 pixels, and the data size is 8,640,000 × 3 = 25,920,000 bytes, more than 100 times over the instructed limit of 200k bytes or less. It is the highest resolution among the choices, but it is excessive for a photo to be posted on a web page, and such a large file also makes the page slow to display. This is the typical wrong answer that results from looking only at the words “the highest resolution” and picking the largest value without checking the condition.
- Calculating the data size of an uncompressed image — data size = total number of pixels × bytes per pixel. 24-bit color is 24 bits = 3 bytes per pixel. Since dpi is the number of pixels per inch, scanning an original that measures 2 inches × 3 inches at R dpi gives 2R × 3R = 6R² pixels, so the data size is 18R² bytes. In this question, at 100dpi it is 200 × 300 × 3 = 180,000 bytes.
- Resolution and data size are related by a square — multiplying the resolution by n multiplies both the height and the width by n, so both the pixel count and the data size become n² times larger. Against the 180,000 bytes of 100dpi, 300dpi is 3² = 9 times that, 1,620,000 bytes, and 1,200dpi is 12² = 144 times that, 25,920,000 bytes. When an upper limit is fixed, choose the largest resolution that can meet it.