Am 27.02.2014 um 18:14 schrieb Obleo Beck <[email protected]>:

> I see, ok.
> 
> Actual using PNG, JPEG and TIFF for NSImage writing.
> Thanks for the info, I been trying more an more to figure out if it was 
> something I missed in translating objective-c to xojo.

Well, the better code is like this:

  dim pImgWMWorking as Picture = LogoMBS(500)
  dim bitmapImageRep as new NSBitmapImageRepMBS(pImgWMWorking)
  
  dim pew as double = bitmapImageRep.width
  dim peh as double = bitmapImageRep.height
  
  // next two lines does same as nssize makeSize
  
  dim nsetW as double = ((72.0 * pew)/300.0)
  dim nsetH as double = ((72.0 * peh)/300.0)
  
  // up to this point all values are the same as returned in objective-c code
  
  bitmapImageRep.setSize(nsetW,nsetH) // this does not seem to work ?
  
  
  dim file as FolderItem = SpecialFolder.Desktop.Child("test.png")
  dim b as BinaryStream = file.CreateBinaryFile("")
  b.Write bitmapImageRep.PNGRepresentation
  b.close

But the problem is that it does not work here. Image does not have higher 
resolution.
  
(and you need next plugin version for this to test.)

Sincerely
Christian

-- 
Read our blog about news on our plugins:

http://www.mbsplugins.de/

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to