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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -