SORU
2 Kasım 2008, Pazar


Bilimsel deneyler bazen büyük ve Uİİmage

NSData, UIImage nesne yüklemeye çalışıyorum ve örnek kodu NSImage, aynı olmalılar sanırım. Ama şimdi resim yükleme sadece, en iyi UIImage yükleme NSData sorunu gidermek için ne merak ediyorum.

CEVAP
10 Mart 2011, PERŞEMBE


UIImageJPEGRepresentation() Daha önce çalışmadım, ama UIImagePNGRepresentation benim için gayet iyi çalışıyor, ve NSData UIImage arasında dönüştürme ölü basittir:

NSData *imageData = UIImagePNGRepresentation(image);
UIImage *image=[UIImage imageWithData:data];

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Amazon Web Services

    Amazon Web S

    8 NİSAN 2009
  • Matt Stokes

    Matt Stokes

    22 Ocak 2008
  • Plugable

    Plugable

    19 Mayıs 2010