• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Urgent: Displaying image from NSData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Urgent: Displaying image from NSData


  • Subject: RE: Urgent: Displaying image from NSData
  • From: "Kranthi Sagar Borra" <email@hidden>
  • Date: Mon, 22 Mar 2004 22:17:17 +0530
  • Thread-topic: Urgent: Displaying image from NSData

Even I had a similar problem. I took a snap shot of my desktop and uploaded that image (picture1.pdf) into the database. So now when I fetch the image my NSData seems to be correct but I am not able to show the image. Its basically because the file is a pdf file and I think WOimage does not support this mime type. Other formats .gif,.jpg etc are working fine.

Thanks.

Regards,
Kranthi Sagar B,


> ----------
> From: 	Greg Liebowitz
> Sent: 	Monday, March 22, 2004 6:48 AM
> To: 	email@hidden
> Subject: 	Re: Urgent:  Displaying image from NSData
>
> ----- Original Message -----
> From: "Greg Liebowitz" <email@hidden>
> To: "David Elsner" <email@hidden>
> Sent: Sunday, March 21, 2004 8:17 PM
> Subject: Re: Urgent: Displaying image from NSData
>
>
> > I did.  To debug, I tried saving theImage to a file.. and found it was not
> a
> > valid image.
> >
> >
> ((((Session)session()).photoData.objectForKey((team.teamNumber() ).toString(
> > ))).toString()).getBytes()  will output the correct uploaded binary data.
> > When I try to convert it to NSData, it looses its data.  Are there any
> other
> > ways around this?
> >
> > Thank you.
> >
> > ----- Original Message -----
> > From: "David Elsner" <email@hidden>
> > To: <email@hidden>
> > Cc: <email@hidden>
> > Sent: Sunday, March 21, 2004 8:15 PM
> > Subject: Re: Urgent: Displaying image from NSData
> >
> >
> > > Did you remember to set the mime type
> > >
> > > On 22/03/2004, at 9:25 AM, <email@hidden> wrote:
> > >
> > > > Hello!
> > > >
> > > > I am trying to display an image stored in a database.  It uploads
> > > > fine..
> > > > showing it is the only issue.
> > > >
> > > > The following is linked to the "data" attribute on my WOImage:
> > > >
> > > > public NSData getTheImage()
> > > >     {
> > > >         ((Session)session()).fetchPhotoList();
> > > >         theImage = new
> > > >
> NSData(((((Session)session()).photoData.objectForKey((team.teamNumber()
> > > > ).toString())).toString()).getBytes());
> > > >
> > > > return theImage;
> > > >     }
> > > >
> > > >
> > > > This:
> > > >
> ((((Session)session()).photoData.objectForKey((team.teamNumber()).toStr
> > > > ing())).toString()).getBytes()
> > > > shows the binary data of the required image with no problem (on a
> > > > system.out.println).  However, when I convert it to NSData, the data
> > > > seems
> > > > to change.
> > > >
> > > > Any ideas?
> > > >
> > > > Thank you in advance,
> > > > Greg
> > > > _______________________________________________
> > > > webobjects-dev mailing list | email@hidden
> > > > Help/Unsubscribe/Archives:
> > > > http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> > > > Do not post admin requests to the list. They will be ignored.
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Urgent: Displaying image from NSData
      • From: "Greg Liebowitz" <email@hidden>
  • Prev by Date: Problems publishing a Web Service with a int[] parameter
  • Next by Date: App hangs on 1st access to DB
  • Previous by thread: Re: Urgent: Displaying image from NSData
  • Next by thread: Re: Urgent: Displaying image from NSData
  • Index(es):
    • Date
    • Thread