Help ! Please.
First the code (extract of) :
log return & "¢¢¢ TEST :" & return
-- Note for NSColor constants it's OK ...
set cc to whiteColor() of current application's class "NSColor" -- or set cc to NSColor's whiteColor()
log cc
--cc's colorUsingColorSpaceName_(NSCalibratedRGBColorSpace)
log current application's NSCalibratedRGBColorSpace
log "--a"
-- Now the trouble
log current application's NSBitmapImageFileType
set typeImageBitmap to current application's NSBitmapImageFileType as list
log "--b"
log count of typeImageBitmap
log "--c"
set t to NSPNGFileType of typeImageBitmap
log t
set tt to current application's class "NSBitmapImageRep"
log tt
--set ttt to NSBitmapImageFileType() of tt -- current application's class "NSBitmapImageRep"'s
--log ttt
set tttt to NSBitmapImageFileType of current application's class "NSBitmapImageRep"
log "--d"
--set tttt to current application's class "NSBitmapImageRep"'s NSBitmapImageFileType's NSPNGFileType
log class of tttt
--set typePNG to NSPNGFileType of NSBitmapImageRep
--tell NSBitmapImageRep to set typePNG to NSPNGFileType of NSBitmapImageFileType
-- == AU SECOURS ! ! ! =====================================================================================
unlockFocus() of champ
set donnees to alloc() of NSData
tell representationImage
-- next line is just a workaround ! I want to write one of the preceding --
------------------------------------------------------------------------------------------------------
set typeImageBitmap to 1 -- TIFF , 5 for PNG ... etc
set donnees to representationUsingType_properties_(typeImageBitmap, null)
end tell
tell donnees to writeToFile_atomically_("/tmp/test.tiff",false)
How i can wite the line
set typeImageBitmap to 1
for acces to the value defined in class NSBitmapImageRep, instead of hard coded “1”
thank you