IPhone: How to get the original photo image with  Picker

Hi!
I'm trying to pick and send (via HTTP) the original image taken by the camera, the 1,600 x 1,2000 image that's available in iPhoto after syncing.
As far as I gathered, the UIImage doesn't help me here, since it's scaled down to 640x480, probably to safe memory. But one should supposedly be able to access the underlying CIImage.
Here's what I'm doing right now:
I'm setting up an ImagePickerController in my
- (void)viewDidLoad
imagePickerController = [[UIImagePickerController alloc] init];
imagePickerController.delegate = self;
imagePickerController.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum;
[self refreshView:self];
and process the picked image with
- (void)imagePickerController:(UIImagePickerController )picker didFinishPickingImage:(UIImage )image editingInfo:(NSDictionary )editingInfo
CGImageRef imgRef = image.CGImage;
CGFloat owidth = CGImageGetWidth(imgRef);
CGFloat oheight = CGImageGetHeight(imgRef);
NSLog(@"Original size = %f %f",owidth,oheight);
NSData imageData = [NSData dataWithData: UIImagePNGRepresentation(image)];//(image, 1.0)
However, I still get the following output:
2008-07-25 11:44:58.543 myApplication[1564:20b] Original size = 640.000000 480.000000
Obviously still scaled down - but there must be a way to access the original.
What am I doing wrong?

Yes, I'm trying on the iPhone, as the camera is unavailable on the simulator.
Here is the code I'm using:
// In my main code, to initialise the picker
UIImagePickerController *picker;
// Check if camera is available
if ( ![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] )
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"Can't access camera" message:@"The camera is unavailable!" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"OK", nil ];
[alertView show];
[alertView release];
return;
picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
[_myView addSubview:picker.view];
[_myView performSelectorOnMainThread:@selector(setNeedsDisplay) withObject:nil waitUntilDone:NO];
// The delegate methods
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo
NSLog( @"Image dimensions: %fx%f", image.size.width, image.size.height );
// Remove the picker interface and release the picker object.
[picker.view removeFromSuperview];
[picker release];
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker
// Remove the picker interface and release the picker object.
[picker.view removeFromSuperview];
[picker release];
}

Similar Messages

  • I use iPhoto and want to know how to get the 'key photo' i select on my MacBook Pro to be the one that gets used on my iPhone when i sync them. Any ideas? also, i want the events to appear in the order i choose on my MacBook too

    I use iPhoto and want to know how to get the 'key photo' i select on my McBook Pro to be the same one that gets used on my iPhone 5s when i sync. i also want the events to appear on the iPhone in the same order i have them on my macbook. any ideas there too?

    Killerfinch wrote:
    My new yahoo account nestles comfortably in iCloud on the mine iPad.
    No, your Yahoo account is not in iCloud (which only handles iCloud mail), it is in Yahoo, and the Yahoo mail account is on your iPad.
    But the MacBook Pro will have none of it! I write this question now as I fear that I will be totally demented very soon and unable to formulate my thoughts clearly!
    Get the correct settings for your account from Yahoo and set it up manually.
    By the way, I also find the "password" issue problematical. It seems Apple want my Apple password rather than my eMail password. All very confusing.
    That would depend on what you are trying to do.

  • How to get the original query string in an event receiver when dialogs are enabled

    I have scenario where I am adding a document to a document library which has an external data column on it. My goal for this column is to have it automatically populated with an appropriate value based on original query string to the page. The general
    idea is that I am on a custom page that has various webparts on it including a view of my document library that is context sensative based on the query string, and I want to use that context sensitivity not just to filter the list but also when adding documents.
    I have been searching around for solutions to this problem all day and have gotten this far:
    I have an event receiver attached to my document library that handles the ItemAdded event syncronously (as such I have the new list item available to me). In that event receiver I am able to set the column values as required. Where I am stuck is on getting
    the value from the query string that I need to actually set as the column value.
    Based on:
    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/8cfcb299-9a55-4139-86ec-0b53b2922a54 and several similar articles/posts I have been able to get the original source Url with the query string I want via the following
    code in my event receiver:
    private HttpContext context;
    public EventReceiver1()
    context = HttpContext.Current;
    public override void ItemAdded(SPItemEventProperties properties)
    var originalQueryString = context.Request.QueryString["Source"];
    // Parse the query string and use the value ...
    The problem is that this solution breaks down if the dialogs are turned on under the advanced settings for the list. The reason the solution fails is because the "Source" query string parameter goes away and is replaced by "IsDlg" set to a value of "1".
    Does anyone know how to get past this hurdle? Any help would be greatly appreciated.

    Hi Stuart,
    The reason I'm looking for "Source" in the query string is because that is something I found to be reliable when the Dialogs are turned off. I've dug around pretty deep in the Request object to see if anything had the data I was looking for and unfortunately
    it doesn't appear to be there. The
    context.Request.QUeryString.ToString()
    returns a rather simple one of:
    List=%7b43ECDCB0-8440-4652-B067-AA20481779D7%7d&RootFolder=&IsDlg=1
    and the
    context.Request.UrlReferrer.Query.ToString()
    has the same value.
    I suspect this is due to the dual step process that takes place in adding an item to a document library where the first modal popup (which I suspect likely has the information I need) gives you the opportunity to browse to your file and then the second
    dialog (maybe this is getting brought up as a result of another request which is now referring back to the original request that brought up the first dialog?) where you edit your properties.
    Thanks for the try though, if you've got anything else I'd love to hear it.

  • How to get the original version of Web report in BW ?

    Hello Friends ,
    I have transported one Web report from BW development to BW Production System.
    But unfortunately , the desired result not me met .
    So I have been asked to keep the original version of the Web report.
    As the new version of Web report has replaced the previous one ,
    So could anybody tell me how to get the original version of Web report in BW ?
    Many thanks in advance !!!!!!!!

    Hi,
    You can use the Transaction STMS choose the option "Import Overview" . In the GOTO tab select "History" and choose "Import History".
    Here you can find the history of requests imported to the prod system.
    Regards,
    K.Manikandan.

  • Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any h

    Having trouble figuring out how to save the original photo after I've cropped it - i.e. I want to create a headshot of my husband from a photo of the two of us, but I also want to keep the original. Seems very basic, but can't seem to figure it out. Any help would be great!

    Use File >> Save As
    Choose a different file name so as not to overwrite the original and don't save any changes when closing the original.

  • HT2931 I am trying to figure out how to get the pre made "beats" with my garage band for my MacBook Air can u help

    I am trying to figure out how to get the pre made "beats" with my garage band for my MacBook Air can u help

    Hello Mattxy2,
    Thank you for the question. It sounds like you would like to add some Apple Loops to your project.  I recommend reviewing the following sections in Garageband Help:
    GarageBand Help - Search for Apple Loops
    http://help.apple.com/garageband/mac/10.0/#gbnd3002ab64
    GarageBand Help - Add Apple Loops to your projects
    http://help.apple.com/garageband/mac/10.0/#gbndc1d3db81
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • How to get the onhand quantity along with zero quantities in Inventory?

    How to get the onhand quantity along with zero quantities in Inventory...Plz reply me as son as possible?

    Hi Akshata,
    In processRequest you can use pageContext.getParameter
    String PartyName = pageContext.getParameter("PartyName");Regards,
    Sujoy

  • How to get the contact photos from the address book on the ipod ??

    Hello !
    I figured out that it was available to sync the address book (on Mac OS)with the contact photos and find them on your ipod nano chromatic... But I have Windows and I can't make it work with Outlook. I can sync it with itunes and have the contact names and few infos but not the pictures, there is just a grey silhouette instead of the contact photo. Is there anybody that know how to get the contact picture on the ipod (with Windows OS) ?
    Thanks a lot in advance !
    Hyrekia

    Hooray !! I have found how to do it !! There is a new option now on itunes when you sync your ipod with outlook. You just have to check the box entitled "add the contact pictures". I'm not sure it was there before, but I did an update today !!
    I'm really glad !!
    Hyrekia

  • How to find the original photo behind faces

    How to find the original picture behind Faces

    That is not the original photo - it shows the entire current photo with edits so you can see the context of the face - you can not see the original photo while in faces - you can in edit mode by depressing the shift key
    LN

  • HT3669 Hi I have a Konica Minolta PagePro 1300W printer. This works with my Windows-based Toshiba laptop but not with my i-Mac. Can someone please advise me how I get the printer to work with my i-Mac? I have installed it but documents don't print. Thanks

    Hi I have a Konica Minolta PagePro 1300W printer. This works with my Windows-based Toshiba laptop but not with my i-Mac. I have the latest (Mountain Lion 10.8.2) OS-X software.
    I have installed the printer using 'System Preferences' on my i-Mac and it appears on the list of available printers but documents that I create just don't print.
    Can someone please advise me how I get the Konica Minolta PagePro 1300W printer to work with my i-Mac?
    Thanks, John Lee

    Looking at the Konica web site for the PagePro 1300W, I saw the following note.
    Please note: This printer is designed to be used in computer operating systems running MS Windows only. Operating systems such as UNIX, Macintosh, or Linux are not supported nor do we have workaround drivers available. Older MS Windows versions, such as Windows 3.1/95/98[pre-SE] and NT 3.51/4.0, are not supported.
    So KM are not going to help you. But the LinuxFoundation does provide a workaround that should allow you to print. Have a look at this web page. You will need to install all three packages as per the instructions from that page.

  • How to get the TableRow from TableView with given row Index.

    Hi ,
    I want to retrieve the TableRow object or Cells of that row of the TableView, for the given row index. How i can get that.
    Here is the below code what i am actually looking for
    TableView table = new TableView();
    table.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
         @Override
         public void changed(ObservableValue<? extends Number> paramObservableValue,Number prevRowIndex, Number currentRowIndex) {
              System.out.println(":::::::::>  Previous Row : "+prevRowIndex+" Current Row : "+currentRowIndex);
              if(prevRowIndex.intValue()>-1){
                   // TODO: Get the TableRow object of prevRowIndex or the cells in that row.
    });Thanks in advance !!

    Jonathan, Thanks for the info !
    Actually my requirement is ,
    1) I have an editable table with four columns. Where the first three colums are editable and the last column is a delete button to delete the record.
    2) My requirement is such that, whenever the user edits a cell, it is not comitted on focus out but the whole row(all cells) is comitted at a time when the user hits "enter". If the validation is not successfull, the textfields are styled with error class and focuses on it.
    So based on the key event on the textfield in the editable cell, i am fetching all the cells in the same row, with the below code.. and doing the save/update operation.
    textBox.setOnKeyReleased(new EventHandler<KeyEvent>() {
         @Override
         public void handle(KeyEvent t) {
              if (t.getCode() == KeyCode.ENTER) {
                          TableRowSkin<ContactPersonResponse> rowSkin = (TableRowSkin<ContactPersonResponse>) cell.getParent();
                    ObservableList<Node> cells = rowSkin.getChildren();
                    view.setCellAction(cells);
                          // The setCellAction(cells) will iterate through all the cells, validates the text field,
                          // if validation is success commits all the cells else styles the cells and focuses on the cell.
    });Till now everything is fine and working properly.
    Now I have new requirement that when the user edits a row (not yet comitted) and if he selects another row, the previous selected row should be automatically committed with validation.
    So my final action is to call the setCellAction(cells) by passing the cells of the previous selected row.
    table.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
         @Override
         public void changed(ObservableValue<? extends Number> paramObservableValue,Number prevRowIndex, Number currentRowIndex) {
              System.out.println(":::::::::>  Previous Row : "+prevRowIndex+" Current Row : "+currentRowIndex);
              if(prevRowIndex.intValue()>-1){
                   // TODO: Need to call the setCellAction method by passing the cells of previous selected row. (prevRowIndex)
                            // Here i am not getting how to get the cells of the previous row.          
    });In the selectedIndex listener , i am not getting how to get the cells/row from the index.
    Any solution or workaround for achieving this functionality is highly apprieciated .
    Thanks & Regards,
    Sai Pradeep Dandem.
    Edited by: Sai Pradeep Dandem on Jan 2, 2012 10:23 PM
    Edited by: Sai Pradeep Dandem on Jan 2, 2012 10:23 PM

  • How to get the exact day date with the another date field?

    Hi,
    Please help me how to get the specific day of the week's date with the help of another date field.
    Actually , one field(week_day) has 1,2,3,4,5,6,7 here 1--MON,2-- TUE like that.
    another field has the date. based on that date, we have to go to that particular week and need to pick up the date by the above week_day. It should be in that week itself.
    Thanks in advance!!
    Regards,
    Vissu...
    Edited by: vissu on Oct 29, 2010 3:07 AM

    Hi,
    Something like this
    SELECT TRUNC(<DATE_COLUMN>,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the particular week of the date
    SELECT TRUNC(SYSDATE,'DAY')+<WEEK_NO_COLUMN> FROM <YOUR_TABLE>;for the current week
    cheers
    VT

  • How to ID the original photo of a group of edits if all are titled similarl

    I am trying to clean out, organize, straighten out my 3000+ photos in iPhoto '08.
    Over the years I have made copies and edits of original photos in the Photo Library. Some of those copies I placed in separate albums, but many times I simply made a copy of the original, edited it, and left it there! I now realize that the Photo Library should house only the original, not the edited photos, but this knowledge came late to me. Also: Not only did I edit my original pictures, but I renamed them, and just looking at the new titles is not sufficient info to detect the original.
    If I look at the ”i“ button to get into on a picture, would I be correct in assuming that the picture with the biggest KB is the original? Say, if I have five photos of my dog, all edited from one lone photo, and titled 'Cheyenne,' 'Cheyenne in pool,' etc, the one with the most KB or MB is the original? But what if in an edit, I make a picture darker, saturate it with color, and make it denser. Would that not make an edited picture actually ”denser?”
    Lorna in Southern California

    Lorna
    The Original will be the largest file. It's a very solid and sensible rule of thumb and will be correct in about 99.999999% of cases.
    But what if in an edit, I make a picture darker, saturate it with color, and make it denser. Would that not make an edited picture actually ”denser?”
    No. When you edit a jpeg it is recompressed and it is inevitable that each generation is smaller than the last. In about 99.999999% of cases.
    Regards
    TD

  • How to get the original record Number in Multi-Record Block

    Hello Everyone,
    I know how to find the duplicate item in the multi-Record block,
    For Ex:
    Line_Num            Item_Name             Quantity
    1                           AA                      10
    2                           BB                      20
    3                           AA Here 3rd record Item_name is duplicated, I can able to check and display the message that 'Item is duplicated' ,I found from [sheikyerbouti.developpez.com/duplicates/duplicates.htm] .
    but I want to show along with original line number i.e 1 when the item_name is entered .
    Here I want to check the original Line_Num and want to display the message
    'Item is duplicated,Update quantity in Original Line 1'
    Can anyone help me to get this?
    Thank You.
    Regards,
    Guru.

    Hi Francois,
    Actually I want to check and show the message when the item_name is entered i.e WHEN-VALIDATE-ITEM TRIGGER.
    I put the following code in WHEN-VALIDATE-ITEM TRIGGER
    Declare
         curnum number;
         dupnum number;
         cur_item varchar2(100);
         v_alert_no number;
         p_linerec varchar2(100);
    Begin
    curnum := TO_NUMBER(:System.Trigger_Record);
    cur_item := :Lines.Item_number;
    First_Record;
    p_linerec := :Lines.Item_number;
    LOOP
    If p_linerec = cur_item then
         dupnum := :Lines.Line_num;
         set_alert_property('ALERT_STOP',ALERT_MESSAGE_TEXT,
    'Duplicate Item Found,Update QTY in Original line number '||dupnum);
       V_ALERT_NO := show_alert('ALERT_STOP');
       :LINES.ITEM_NUMBER := NULL;
    :LINES.ITEM_DESCRIPTION:= NULL;
    :LINES.ITEM_REVISION:= NULL;
    :LINES.ITEM_CATEGORY:= NULL;
    elsIF (:System.Last_Record = 'TRUE') THEN
         Go_Record(curnum);
         EXIT;
      ELSE
         Next_Record;
      END IF;
    END LOOP;
    End; But I am getting the following error,
    FRM-40737:Illegal Restricted Procedure
    FIRST_RECORD in WHEN-VALIDATE-TRIGGERand then
    its showing for first line itself.
    Duplicate Item found.Update QTY in Original line number 1so I put the condition
    If :Lines.Line_num > 1 then --Only to check when the block having more than one record.but now it checking from second record and displaying,
    Duplicate Item found.Update QTY in Original line number 2 --(instead of Update QTY in Original line number 1)Can you tell me how can I change the above code for my requirement?
    Thank you.
    Edited by: Gurujothi on 27 Mar, 2013 5:20 PM

  • How to get the whole map image after zoom in?

    Hi,
    I use mapviewer API to generate map images and put them in JSP as well as in Java Applet. I called the method getGeneratedImage(). After I using the methods zoomIn() or zoomOut(), I got a new map image. But the size is fixed, so after zoom in I can only see a part of the whole map. I would like to use scrollbar to see other part of the map after zoom in.
    How can I solve this problem? I have the images as predefinied themes saved in database with MBR information.
    Thanks in advance.

    Hi,
    For the map request in MapViewer you may define the data area that you want to display, as well as the device size (width and height). The result is a java Image with width and height sizes. You can draw this image on a canvas with scroll bars, and if the size of the canvas is smaller than the image size, then you should see the scroll bars. But you have to code that. MapViewer will just return an Image with the specified size.
    The zoom in/out options just change the data area, but keeps the device size. Therefore you should use the API methods to set the data area (setBox or setCenterAndSize) and to set the device size (setDeviceSize), in order to control the size of your resulted image, and then draw it on your canvas with scroll bars.
    Regards.

Maybe you are looking for