Image Name retrival from web-page
Image Name retrival from web-page
- Subject: Image Name retrival from web-page
- From: ramya laxmi <email@hidden>
- Date: Fri, 23 Dec 2005 18:45:21 +0530
Hi,
Ur right...,
When the user drags the image from webpage, the filename and image are
stored in pasteboard.
We can retrieve the file name thru :
NSArray *urlArray = [pasteBoard propertyListForType: NSURLPboardType];
NSString *imageNameTemp = [[urlArray objectAtIndex: 0]
lastPathComponent];
This gives u the exact file name.
To retrieve image:
NSData *carriedData = [pasteBoard dataForType:NSTIFFPboardType];
NSImage *image = [[NSImage alloc] initWith
Data:carriedData];
This gives the image.
But when an image-link(Image-link = whn u click the image u move to some
other page) is dragged
and dropped ,
iam getting the image correctly,
but the above code for file name retrival is not working.
[Actally , instead of filename its returning the link-path lastComponent].
How to get the correct file name.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden