objective c - NSSharingServicePicker and PNG preserving transparency -


i'm trying make sharing of image while preserving transparency, when share it, transforms image jpeg losing transparency, wrong?

nsimage *image = [[nsimage alloc] initwithsize:size]; [image lockfocus];  cgcontextref context = [nsgraphicscontext currentcontext].cgcontext; cgcontextsetinterpolationquality(context, kcginterpolationhigh);  // transparent image [[nscolor clearcolor] setfill]; cgcontextfillrect(context, exportview.bounds);  // transparent view exportview.wantslayer = yes; exportview.layer.opaque = no; exportview.layer.backgroundcolor = [nscolor clearcolor].cgcolor; [exportview.layer renderincontext:context];  [image unlockfocus]; [exportview removefromsuperview];  nssharingservicepicker *sharingservicepicker = [[nssharingservicepicker alloc] initwithitems:@[image]]; [sharingservicepicker showrelativetorect:[sender bounds] ofview:sender preferrededge:nsrectedgeminy]; 

thanks


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -