> Am 02.05.2016 um 17:48 schrieb James Sentman <[email protected]>:
> 
> I’m still in the middle of moving my core image processing to a separate 
> background app that I can restart periodically to recover the large amounts 
> of leaked memory. My test version of the app that still does it inline has 
> been running for 4 days and is up to 1.2gig of memory allocated to the app ;) 
> At the moment it’s still running but I can’t release it like that… 

Okay. If you use Console apps, you may look into NSAutoReleasePoolMBS class.
Make a new instance before doing something and than release it later. This 
cleans up all the temp objects between.

> I’ve hit a snag in doing an NSAffineTransformMBS in the console app. The code 
> that worked fine in the Desktop app is just:
> 
> That works perfectly to do a vertical/horizontal flip on an image with very 
> few processing microseconds on a desktop app, but it somehow prevents the 
> rendering of the image when compiled into a console app.

For me this works:

  dim f as FolderItem = SpecialFolder.Desktop.Child("test.jpg")
  dim c as new CIImageMBS(f)
  
  
  dim myFlipFilter as new CIFilterAffineTransformMBS
  myFlipFilter.SetDefaults
  dim myflipAffine as new NSAffineTransformMBS(-1.0,0.0,0.0,-1.0,0.0,0.0)
  myFlipFilter.inputTransform = myflipAffine
  
  myFlipFilter.inputImage = c
  dim out as CIImageMBS = myFlipFilter.outputImage
  
  
  dim n as NSImageMBS = out.RenderNSImage
  dim t as string = n.TIFFRepresentation
  
  f = SpecialFolder.Desktop.Child("output.tif")
  dim b as BinaryStream = BinaryStream.Create(f)
  b.Write t
  
Writes file to disk with flipped view.

> As far as I can tell all the methods are listed as supported in the docs.

That is just a checkbox I check for all things that may work. It does not say 
that I tried it!



So if something doesn't work for you, maybe there is a bug somewhere and one of 
the other functions called in-between.

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