MacOSXIconReader.st
changeset 3934 993f8921185d
parent 3933 b4af58284a84
child 3937 95c7ec9f0a7e
equal deleted inserted replaced
3933:b4af58284a84 3934:993f8921185d
   798 
   798 
   799     |offset|
   799     |offset|
   800 
   800 
   801     offset := 0.
   801     offset := 0.
   802     (bytes from:1 to:4) = #[0 0 0 0] ifTrue:[
   802     (bytes from:1 to:4) = #[0 0 0 0] ifTrue:[
   803         self halt.
   803         self breakPoint:#cg.
   804         offset := 4.
   804         offset := 4.
   805     ].    
   805     ].    
   806     ^ self readPackBitsImageFrom:bytes asByteArray offset:offset width:48 height:48 depth:8.
   806     ^ self readPackBitsImageFrom:bytes asByteArray offset:offset width:48 height:48 depth:8.
   807 
   807 
   808     "Modified: / 22-02-2017 / 10:32:07 / cg"
   808     "Modified: / 24-02-2017 / 01:39:56 / cg"
   809 !
   809 !
   810 
   810 
   811 read_ic07_from:bytes
   811 read_ic07_from:bytes
   812     "read an ic07 (PNG or JPEG, 128x128) format icon"
   812     "read an ic07 (PNG or JPEG, 128x128) format icon"
   813 
   813 
   962     ^ self common_read_paletteImage_from:bytes size:1024 width:32 height:32 depth:8
   962     ^ self common_read_paletteImage_from:bytes size:1024 width:32 height:32 depth:8
   963 
   963 
   964     "
   964     "
   965      self fromFile:'/Applications/TextEdit.app/Contents/Resources/txt.icns'
   965      self fromFile:'/Applications/TextEdit.app/Contents/Resources/txt.icns'
   966     "
   966     "
       
   967 !
       
   968 
       
   969 read_icm4_from:bytes
       
   970     "read (actually: skip) an icm4 record."
       
   971 
       
   972     self breakPoint:#cg.
       
   973     ^ nil
       
   974 
       
   975     "Created: / 24-02-2017 / 01:40:13 / cg"
       
   976 !
       
   977 
       
   978 read_icm8_from:bytes
       
   979     "read (actually: skip) an icm8 record."
       
   980 
       
   981     self breakPoint:#cg.
       
   982     ^ nil
       
   983 
       
   984     "Created: / 24-02-2017 / 01:40:23 / cg"
       
   985 !
       
   986 
       
   987 read_icm__from:bytes
       
   988     "read (actually: skip) an icm# record."
       
   989 
       
   990     self breakPoint:#cg.
       
   991     ^ nil
       
   992 
       
   993     "Created: / 24-02-2017 / 01:39:43 / cg"
       
   994 !
       
   995 
       
   996 read_icnV_from:bytes
       
   997     "read (actually: skip) an icnV record."
       
   998 
       
   999     self breakPoint:#cg.
       
  1000     ^ nil
       
  1001 
       
  1002     "Created: / 24-02-2017 / 01:43:21 / cg"
   967 !
  1003 !
   968 
  1004 
   969 read_icp4_from:bytes
  1005 read_icp4_from:bytes
   970     "read an ipc4 (PNG or JPEG, 16x16) format icon"
  1006     "read an ipc4 (PNG or JPEG, 16x16) format icon"
   971 
  1007