Data Persistence for images
Hey,
I'm currently doing a little iPhone-App, that allows the user to load images from his library into
UIImageViews. And I would like to save these images, so that after quitting and relaunching the app,
the images are still there.
How can I do this? Can I somehow retrieve the path for the image and save it via archiving?
UIImages don't conform to NSCoding, but I could maybe save the path as a String. But how
do I get the path? Or is there a better way?
Can someone please help me with this?
Thanks a lot!
Hi Shinichi -
Shinichi wrote:
But how do I get the path?
How did you find the image in order to load it into a UIImageView? If this is an image that was pulled up by UIImagePickerController I don't think you can access it directly even if you could obtain a path or key.
UIImages don't conform to NSCoding
Images are intended to be stored in a standard file format. For example use [UIImagePNGRepresentation|http://developer.apple.com/iPhone/library/documentati on/UIKit/Reference/UIKitFunctionReference/Reference/reference.html#//apple_ref/d oc/uid/TP40006894-CH3-SW10] to save a UIImage in a png file.
So for example, if you've copied an image in [imagePickerController:didFinishPickingMediaWithInfo:|http://developer.apple.co m/iphone/library/documentation/UIKit/Reference/UIImagePickerControllerDelegateProtocol/UIImagePickerControllerDelegate/UIImagePickerControllerDelegate.html#// appleref/doc/uid/TP40007069-CH3-SW8], you can certainly save it in a png file, then store the path to that file in a plist (e.g. NSUserDefaults) or database. But I don't think there's any way to save the redundant disk usage by storing a reference to the original (see also: [http://developer.apple.com/iphone/library/qa/qa2009/qa1622.html] and [http://www.iphonedevsdk.com/forum/iphone-sdk-development/17319-how-get-iphone- photo-library-path.html]).
\- Ray
Similar Messages
-
Data persistence for the different BPM instance
Hi,
My scenario is
I am sending the data from IDOC to IDOC.
I have run one instance of the interface and successfully processed. I want to use the BPM container values to be persistant for the next instance of the BPM run.
Is there any way to save the container values available for multiple instances of the interface?
Thanks
MohanHi Mohan
Short answer: no. You cannot do this.
However, BPM has a mechanism specifically designed for associating otherwise separate messages: correlations. Basically, by defining a suitable correlation, separate messages are sent to <i>the same BPM instance</i>, thus allowing you to do whatever it is you need to do related to multiple messages.
If this isn't the type of thing you are looking to do, post some more details of your usage scenario so we can give a more qualified answer.
Best regards,
Thorsten -
I generate PDF documents in code (basically converts TIFF images to PDF, using FOP).
Few of the PDFs can not be viewed on Adobe Reader 9.1.0, and 7.0.9. But, these open fine on 8.0 version.
With 9.1.0 version I get error as "Insufficient Data for image"
With 7.0.9 the error is "A drawing error occured"
8.0 works fine and opens the PDF.
Is there any issue with 9.1.0 for opening PDFs, I got this version installed recently on my system.
Appreciate an early help/views on this issue.
Thanks,
UmakantTry this - from adobe support!
It worked for me and (as it seems) solved a one year long anoying issue.
1. Exit Acrobat.
2. Choose Start > Run, and type: %APPDATA%\Adobe\Acrobat\ into the Open text box. Click OK.
3. Right-click either the 6.0 or 7.0 folder, and choose Delete.
I deleted both folders.
Dont worry these two preferences folders will automatically be renewed by acrobat! -
PDF's I'm creating with Group 4 data report Insufficient Data for Image
I am maintaining a software application, which creates PDF files from JPEG and TIFF (with Group 4 compression) image files, which typically come from scanners. It has performed well for many years, but as of the release of Adobe Reader X, we are seeing "Insufficient Data for Image" on some images.
I've read reports of this message on these forums, and I've tried shrinking the image, adjusting zoom, and upgrading to Adobe Reader XI -- none of these have worked.
Our software creates these PDF files by wrapping the raw image data in an XObject, which looks like this:
24 0 obj
<< /Type /XObject
/Subtype /Image
/Name /Im1
/Filter /CCITTFaxDecode
/Width 1704
/Height 2200
/BitsPerComponent 1
/ColorSpace /DeviceGray
/DecodeParms <</K -1 /Columns 1704 /Rows 2200 >>
/Length 25 0 R >>
stream
<<BINARY DATA>>
endstream
endobj
25 0 obj
31512
endobj
Wherein, the <<BINARY DATA>> are 31,512 bytes of raw image data -- the same data which would appear in a Group 4 compressed TIFF file.
Indeed, when we do create a Group 4 TIFF file with the same binary data, it opens successfully in all common viewers.
Any assistance, such as the precise meaning of this error message, could be helpful.Just a note that the bug appears to relate to JPXDecode, so far as all previous reports seem to suggest (no inside information). JPXDecode supports multiple image resolutions in the same image, so messing with zoom sometimes helps. If you can post a complete file somewhere it might interest someone who could analyse it.
The message simply means that decompressing the filters does not yield enough bytes. This may either reflect that there really isn't enough data, or it could indicate any kind of data error (which causes the filter to silently return EOF). -
Reader XI still gives "insufficient data for image" error
Our fax machine creates .pdf files of the faxes and recently our back office has had trouble printing them. When I look at them they give an "insufficient data for image" error, but only on one page each. I've tried upgrading to reader XI but the problem persists. I've gotten around it by taking a screenshot and printing the one page that doesn't work so far, but I'd like to get this fixed. It only started happening today. I have a call in to our fax provider, but I was wondering if anyone here had any possible solutions.
Thanks,
Also due to the nature of the documents I'm unable to provide a sample.
Message was edited by: riderryukenIt is also happening to me (running v 11.0.2). I tried adjusting the various settings under the "View" menu and at best could only see part of what was missing. I resolved the issue by downloading and installing Foxit Reader. Bingo! now I can see the entire document.
-
I just received an update to version 10.1.4. My previous version was 10.1.23. After the upgrade , I started to receive an error message insufficient data for image. This is the first time this error appeared so it has to be related to the new version. I unistalled this version and installed version 9, the problem went away. Is anyone else having this issue or is there a fix for this issue?
Thanks...At last I understand.
Sorry I was so slow.
By the time you see the "Insufficient data for an image" message it is too late.
Exit Acrobat without saving anything. If you save the PDF it is worthless; reget the original.
Note that when I tried this procedure just using the "Optimize Scanned PDF" tool instead of saving and working with an optimized PDF the procedure failed with the "Insufficient data for an image" message. As a result, though the following procedure seems to include some redundant steps they appear to be necessary in this context.
From here on I'll assume you have added "Recognize text in this file" and "Manage Embedded Index" to your Quick Tools.
Open the downloaded PDF
File > Save As > Optimized PDF
UNcheck "Optimize images only if there is a reduction in size"
OK
Save [at this point you may want to save it under another name]
(for my PDF for my machine this took 5 minutes)
(I got the following message:
Conversion warning: THe PDF document contained image masks that were not downsampled"
OK
Select the "Recognize text in this file" quick tool
On the Recognize Text panel
Mark "all pages"
"Primary OCR Language English (US);
PDF Output Style Searchable Image
Downsample To: 600 dpi"
OK
(for my PDF for my machine this took 15 minutes)
Select the "Manage embedded index" quick tool
On the Manage Embedded Index panel
Select "Embed Index"
"The PDF document needs to be saved before an index can be embedded. Do you want to save and continue?"
Yes
Status: Index has been embedded"
OK
Edit > Find > Hog [this edit test works] so this workaround did the job.
Thanks again for your help. -
Insufficient data for image (9-9.3) or a blank page (8.1)
Hi,
We recently started using a Xerox workcenter 5675 to scan document to my central server. About 3 days ago users started reporting an error message with a white page. I immediately checked the copier, nothing changed setting wise. It has been fully restarted, and other software like Sumatra PDF, and Apple's Preview applications open the PDFs just fine.
In any version of 9 the error "insufficient data for image" pops up. In 8.1 it just shows a blank page.
I would like to troubleshoot this issue, as we need to use the features of creating PDFs.
Is there a way I can view the code of the PDF and post it or even submit it to a site or software to identify any bad code, so that then I know it is the copier? Is there a way to reduce the strict rules reader follows?
Anyone have any ideas or clues as to what the issue might be, for the PDFs to be fine one day and not the next? I can easily provide a few PDFs made days apaprt for review.
Thanks!I do not really have any ideas. What software product you use to run the scan - Acrobat, or Xerox' own software?
If Acrobat, please try the Acrobat forum, and mention your OS and Acrobat version.
If Xerox, contact them. -
How do I resolve the "insufficient data for image" error for Adobe reader 11.0.04?
Hi Johnkel1524,
Please refer : http://helpx.adobe.com/acrobat/kb/insufficient-data-image.html
Also try updating to 11.0.5 and check. -
Insufficient Data for Image Adobe Reader XI
I have Adobe Reader XI and can clearly see my PDF's that I collate, however I am still getting the error message Insufficient Data for Image. When I email the PDF the recipient cannot print them as the error message reads Insufficient Data for Image. Any thoughts on how to resolve this please?
Hi NSC
Edit your image using the Edit Text and images option
Right click on the image and edit
It will open the image in the native application.
Simply save the image again without making any changes and see if that helps. -
I have just reinstalled Adobe Acrobat X1 and I can't save any PDF's that are emailed to me. I just get "This document could not be saves. There is a problem reading this document (21)" and then when I click OK i get "insufficient data for image" Help!
More information about this issue can be found here:
https://forums.adobe.com/thread/1672655
A "quick" fix that worked for me was to uninstall Adobe... then download the base install for Adobe Reader 11.0.
Then download each of the individual updates and run them sequentially.
I've installed back up to the last security update which is version 08 and have been able to do normal Save As operations.
You will have to disable automatic updates in order to stay at version 08 until Adobe resolves this issue in a later release.
http://www.adobe.com/support/downloads/product.jsp?product=10&platform=Windows
Adobe Reader 11.0 - Multilingual (MUI) installer AdbeRdr11000_mui_Std
Adobe Reader 11.0.01 update - Multilingual (MUI) installer AdbeRdrUpd11001_MUI.msp
Adobe Reader 11.0.02 update - All languages AdbeRdrSecUpd11002.msp
Adobe Reader 11.0.03 update - Multilingual (MUI) installer AdbeRdrUpd11003_MUI.msp
Adobe Reader 11.0.04 update - Multilingual (MUI) installer AdbeRdrUpd11004_MUI.msp
Adobe Reader 11.0.05 security update - All languages AdbeRdrSecUpd11005.msp
Adobe Reader 11.0.06 update - Multilingual (MUI) installer AdbeRdrUpd11006_MUI.msp
Adobe Reader 11.0.07 update - Multilingual (MUI) installer AdbeRdrUpd11007_MUI.msp
Adobe Reader 11.0.08 security update - All languages AdbeRdrSecUpd11008.msp -
Problem with "Insufficient data for image" and embedded JPEG 2000 Images
I frequently download pdf from the http://www.glorecords.blm.gov web site. They are reporting a problem with Reader Reader 10.1.4 and the pdf files they have.
"("Insufficient data for image" and embedded JPEG 2000 Images)"
I am experiencing the same "Insufficient data for image" error when opening their downloaded pdf and viewing in ACROBAT X 10.1.4.
Can someone address this please?
Win 7 sp1Read this:
http://blogs.adobe.com/dmcmahon/2012/08/21/acrobat-insufficient-data-for-an-image-error-af ter-updating-to-10-1-4-or-9-5-2/ -
Data Merge Remove Blank Lines for Images?
I'm trying to use data merge to generate these labels:
I have a spreadsheet with 20 or so products. Each product can have up to 6 of about 18 icons. The problem is, the remove blank lines feature doesn't seem to work for image placeholders. Any ideas how to get around this?
Any suggestions would be greatly appreciated.I think I know what the OP wants to do - that is, where no logo is applicable, then all the logos shift to the left... or right... or remain centered.
I've tackled this before and have an answer... even have a tutorial for it on my blog. Go to http://colecandoo.wordpress.com/2012/02/19/going-beyond-stencil-letters/ and then go to 4: SCRABBLE LETTERS and have a read of that. There is a PDF to download which has attachments inside of the indesign file and assets used to make the tutorial.
The key to getting the images to disappear is fourfold.
First, the image frames have to be inline graphics one next to the other, aligned with whichever text feature is appropriate.
Second, the picture placement options in the merge have to be "fit frame to content"
Third, there can't be "blank" records in the csv/txt file when there is no picture. instead, create a "blank.pdf", or download the one i've graciously decided to host on my site: http://colecandoo.files.wordpress.com/2012/08/blank.pdf
Fourth, the PDFs going into the fields must be using the artbox to get it's measurements. I find that this can be accomplished by placing a PDF image with "show placement options" turned on, then selecting the artbox for the measurement, then clicking ok. until it is told not to, any PDF placed in any file from that point will use that artbox as a reference until it is told not to in the "show placement options".
Again, my blog has a tutorial and sample to play with. Good luck. -
Hello all,
I am using the IMAQ Match Pattern 4 to detect the rotation angle of a template image. However, it shows the error: "Error 1074395241: The template descriptor does not contain data required for rotation-invariant matching." What is the problem exactly? How to solve this? The details are explained below.
My project is a little bit complicated. Part of the block diagram containing the IMAQ Match Pattern 4 is shown below:
The source image is a series of frames of images read from an AVI video (I used a for loop to process the images frame by frame). The template image is a selected region of the first frame. So it means, the user selected the object of ineterst in the first frame of the video, and in each of the following frames, we need to find the matched object of interest & determine its rotation angle. When I run the block diagram shown above, it does not have any error. However, it shows the rotation angle as zero no matter what it "really" is. Therefore, I changed the block diagram by adding the parameters, shown below:
But in this case, when I run it, it shows the error that I have indicated in the subject line.
If you need more details about my project to identify the problem, please let me know.
Thanks in advance.
Solved!
Go to Solution.-Please go through pattern matching example which comes along with labview fiirst
Go to labview Help>>Find Examples and you can search for example.
-You have create template with angle range and what type of pattern matching you want use.
-For this you have to use IMAQ Learn Pattern before using IMAQ Match Pattern 4
Refer :http://zone.ni.com/reference/en-XX/help/370281U-01/imaqvision/imaq_match_pattern_4/
Thanks
uday,
Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
Certified LabVIEW Associate Developer (CLAD) Using LV13 -
Can´t create a date attribute for basic asset
Hi
I created a basic asset where I want to have a date attribute to pick up a date for calendar.
My question is: How can I create a date attribute for a basic asset? For what I understand I have to create an element attribute in my descriptor file like this
<PROPERTY NAME="imagedate" DESCRIPTION="Image date">
<STORAGE TYPE="TIMESTAMP" LENGTH="8"/>
<INPUTFORM TYPE="ELEMENT" WIDTH="24" MAXLENGTH="48" REQUIRED="NO" DEFAULT="" INSTRUCTION="Format: yyyy-mm-dd hh:mm"/>
<SEARCHFORM DESCRIPTION="Image date" TYPE="ELEMENT" WIDTH="48" MAXLENGTH="128"/>
</PROPERTY>
Then, when I create a new instance of this asset, this attribute appears with this error:
Date: Unable to find element OpenMarket/Xcelerate/AssetType/Oportunidade/ContentForm/imagedate
But the element (imagedate.xml) is there!!
I request help.It seems that the table does not have the entries, maybe b/c we are on R3 4.7. Could you tell me what the entries are suppossed to be to allow the Asset and Cost Center lookup? The search does work for WBS element though and I don't see anything specific to WBS element in that table. In any case if you know the entries that would be great, also this table is not modifiable via SM30, here are the entries that I have in that table.
AUF_NETNR PLM_HELPVALUES_AUTHCHECK
BU_PARTNER BUPA_BAPI_F4_AUTHORITY
DAENR PLM_HELPVALUES_AUTHCHECK
DOKNR PLM_HELPVALUES_AUTHCHECK
EQUNR PLM_HELPVALUES_AUTHCHECK
KUNNR PARTNER_BAPI_F4_AUTHORITY
LIFNR PARTNER_BAPI_F4_AUTHORITY
MATNR PLM_HELPVALUES_AUTHCHECK
NW_AUFNR PLM_HELPVALUES_AUTHCHECK
PARNR PARTNER_BAPI_F4_AUTHORITY
PS_POSID PLM_HELPVALUES_AUTHCHECK
PS_PSPID PLM_HELPVALUES_AUTHCHECK
QMNUM PLM_HELPVALUES_AUTHCHECK
S_AGNCYNUM INT_FLBOOK_F4_AUTHORITY
S_AIRPORT INT_FLBOOK_F4_AUTHORITY
S_BOOK_ID INT_FLBOOK_F4_AUTHORITY
S_CARR_ID INT_FLBOOK_F4_AUTHORITY
S_CITY INT_FLBOOK_F4_AUTHORITY
S_CONN_ID INT_FLBOOK_F4_AUTHORITY
S_COUNTNUM INT_FLBOOK_F4_AUTHORITY
S_COUNTR INT_FLBOOK_F4_AUTHORITY
S_CUSTOMER INT_FLBOOK_F4_AUTHORITY
S_FLCONN INT_FLBOOK_F4_AUTHORITY
S_FLCONN1 INT_FLBOOK_F4_AUTHORITY
S_FLCONN2 INT_FLBOOK_F4_AUTHORITY
S_PLANETYE INT_FLBOOK_F4_AUTHORITY
S_TRNUM INT_FLBOOK_F4_AUTHORITY
TPLNR PLM_HELPVALUES_AUTHCHECK
USCOMP SUSR_BAPI_F4_AUTHORITY
XUBNAME SUSR_BAPI_F4_AUTHORITY -
Radio group with URL for image in a table
I'm trying to display some text and an image for a radio group so the form looks like
(*) text for item 1 {image for item 1}
( ) text for item 2 {image for item 2}
( ) text for item 3 {image for item 3}
I've found these:
Re: Is it possible to display an image instead of button in a radio group?
How to show image in radio group ?
It looks like all I have to do is create a LOV that looks like:
SELECT {complex stuff that generates the text string, img tag, and URL for image}
,DB_PK
FROM dynamic_view_for_lov -- public synonym
But, my images are stored in a table.
I have been able to create an IR using the "Column Format=BLOB" method.
The SQL for the report looks like:
select
db_pk, display_text, image_len, image_clob
from dynamic_view_for_lov -- public synonym
And the Number/Date Format for the IMAGE_LEN column is:
IMAGE:DYNAMIC_VIEW_FOR_LOV:IMAGE_BLOB:DB_PK::::::Inline:Download
My question: How do I create the URL for the img tag for the LOV?
many thanks
MKMikeKutz wrote:
I think Homer Simpson said it best: Doh!
For the person in the future, you have to 'fake create' the Automated Row Fetch process.
The get_blob_file_src gets all the information from that Process and the column name of the Item Type that is on the same page.
I forgot where I read about that trick.
Basically, you create the Automated Row Fetch process, then 'disable' it.
Same thing with the required Item Type. Create it as a "File Type", just to tell APEX that it comes from a Database Column,.... then change it to a 'hidden' type.
You don't have to "fake' it if the application already contains the file upload item and ARF. The assumption is that the application will contain these components in order to maintain the BLOBs and you'll just reference the functional ones.
Maybe you are looking for
-
Photoshop 7 (& other old Adobe programs) installation in Windows 7 Pro 64 bit
Recently I purchased a new computer running Windows 7 Pro (64 bit) with 2 TB hard drive and 16 GB memory and faced the task of trying to install Photoshop 7, Illustrator 8, Acrobat 8 Pro, and Dreamweaver CS3 that I had used very satisfactorily on my
-
Can time capsule back up an external hard drive attached to my imac and the iMac internal Harddrive
Can time capsule back up an external hard drive attached to my imac and the iMac internal Harddrive
-
VBA does not recognize non-English characters
Hello guys, I have a new laptop with Windows 8.1 bought in the USA and I'm having a difficulties with Excel VBA (Office 365 University-64x bought in the Czech Republic - Central Europe). The VBA does not recognize non-English characters (particularly
-
HT3986 Where are the individual files located in iphoto
Where are the individual files located in iphoto, thanks for your help
-
I've got a form that works fine on Windows in IE and Firefox. On the Mac, when clicking the submit button in Safari, the address bar flashes and then does nothing. Any thoughts?