ImageReader.st
changeset 8146 97a4ee050bd6
parent 8145 83f792c6d9b1
child 8246 7fbe2b212aee
equal deleted inserted replaced
8145:83f792c6d9b1 8146:97a4ee050bd6
  2393 !ImageReader methodsFor:'accessing'!
  2393 !ImageReader methodsFor:'accessing'!
  2394 
  2394 
  2395 bitsPerPixel
  2395 bitsPerPixel
  2396     "return the number of bits per pixel"
  2396     "return the number of bits per pixel"
  2397 
  2397 
       
  2398     "/ if depth was given, that is what we use;
       
  2399     "/ otherwise, compute from bitsPerSample.
       
  2400     "/ notice, that depth is >= sum(bitsPerSample),
       
  2401     "/ for example, in a 16bit image, we mght have
       
  2402     "/ depth == 16 and bitsPerSample = 5+5+5,
       
  2403     
       
  2404     depth notNil ifTrue:[^ depth].
       
  2405     
  2398     bitsPerSample isNil ifTrue:[^ nil].
  2406     bitsPerSample isNil ifTrue:[^ nil].
  2399     ^ bitsPerSample sum
  2407     ^ bitsPerSample sum
       
  2408 
       
  2409     "Modified (format): / 31-08-2017 / 18:09:59 / cg"
  2400 !
  2410 !
  2401 
  2411 
  2402 bitsPerRow
  2412 bitsPerRow
  2403     "return the number of bits in one scanline of the image"
  2413     "return the number of bits in one scanline of the image"
  2404 
  2414