Ticket #207: ImageTests-test_issue_207_snapshot_16bpp_produces_24bpp_image.st

File ImageTests-test_issue_207_snapshot_16bpp_produces_24bpp_image.st, 732 bytes (added by patrik.svestka@…, 6 years ago)

16bpp produces 24bpp image when grabbed from screen

Line 
1"{ Encoding: utf8 }" !
2!ImageTests methodsFor:'tests'!
3
4test_issue_207_snapshot_16bpp_produces_24bpp_image
5 " Testing long strings display.
6 The test takes shown textView and tries to find out non-white pixels.
7
8 For more visit: https://swing.fit.cvut.cz/projects/stx-jv/ticket/126"
9 | view image |
10
11 self skipIf: Screen current depth ~~ 16 description: 'Different than 16bit resulution'.
12
13 [
14 view := Button new.
15 view label: 'Hello world'.
16 view open.
17 image := Image fromView: view grab: false.
18 ] ensure:[
19 view topView close.
20 ].
21 self assert:(image isDepth16Image).
22
23 "Created: / 25-04-2018 / 10:05:47 / svestkap"
24! !
25