How can I decode a data stream to jpeg image?
Hi
I am using the tranfered jpeg-data stream of a scanner module which I need to decode and display as an image on my vi.
Question:
With which method i can do that on the fly?
or
do I need to save the data stream (string) first to decode it afterwards with the "Read JPEG file.vi"? If so, how do I save the data in the correct way in the way that LabView can read it?
thanks in advance
Norick
Solved!
Go to Solution.
For Windows I use .NET to do this type of conversion without resorting to writing temporary files. This VI will convert most formats (bmp,jpg,gif,tif) to a PNG string and then you can use the native PNG data to LV image VI. Why they do not provide string based versions for all image formats is beyond me (idea perhaps?).
Attachments:
StringToImage.vi 33 KB
Similar Messages
-
Lost all of my data on iphone and have no cloud back up how can i get my data back
lost all of my data on iphone and have no cloud back up how can i get my data back
iOS devices do backup automatically to iCloud providing:
iCloud Backup is turned on
It has a Wi-Fi connection
It is connected to a power source
The screen is off
5GB is plenty of storage for me to backup to iCloud automatically.
I have a 64GB iPhone & a 128GB iPad both backing up to the same iCloud account and I still have nearly 2GB free.
This is mainly because media is not backed up and Photo Stream & iTunes purchases do not count against your iCloud storage.
Here’s what iCloud backs up:
Purchase history for music, movies, TV shows, apps, and booksYour iCloud backup includes information about the content you have purchased, but not the purchased content itself. When you restore from an iCloud backup, your purchased content is automatically downloaded from the iTunes Store, App Store, or iBooks Store. Some types of content aren’t downloaded automatically in all countries, and previous purchases may be unavailable if they have been refunded or are no longer available in the store. For more information, see the Apple Support article iTunes in the Cloud availability by country. Some types of content aren’t available in all countries. For more information, see the Apple Support article Which types of items can I buy in my country?.
Photos and videos in your Camera Roll
Device settings
App data
Home screen and app organization
iMessage, text (SMS), and MMS messages
Ringtones
Visual Voicemail -
How can i copy my photo stream to my computer?
how can i copy my photo stream to my computer?
Hello dorslei,
Thank you for the question. Use these steps to enable Photo Stream on you PC:
How do I turn on My Photo Stream?
After your devices are up-to-date and you have set up your iCloud account, it’s easy to turn on My Photo Stream on any of your devices:
PC: Open the iCloud Control Panel for Windows and select the checkbox for Photos (Photo Stream in iCloud Control Panel 2.x). You can click the Options button to verify that My Photo Stream is enabled and adjust the settings. Be sure to click Apply when done.
iCloud: My Photo Stream FAQ
http://support.apple.com/kb/ht4486
If you do not have iCloud set up on your PC, use the steps in this resource to download and install the iCloud Control Panel:
iCloud - Learn to set up iCloud
http://www.apple.com/icloud/setup/pc.html
Thank you for using Apple Support Communities.
Best,
Sheila M. -
How can I load my data faster? Is there a SQL solution instead of PL/SQL?
11.2.0.2
Solaris 10 sparc
I need to backfill invoices from a customer. The raw data has 3.1 million records. I have used pl/sql to load these invoices into our system (dev), however, our issue is the amount of time it's taking to run the load - effectively running at approx 4 hours. (Raw data has been loaded into a staging table)
My research keeps coming back to one concept: sql is faster than pl/sql. Where I'm stuck is the need to programmatically load the data. The invoice table has a sequence on it (primary key = invoice_id)...the invoice_header and invoice_address tables use the invoice_id as a foreign key. So my script takes advantage of knowing the primary key and uses that on the subsequent inserts to the subordinate invoice_header and invoice_address tables, respectively.
My script is below. What I'm asking is if there are other ideas on the quickest way to load this data...what am I not considering? I have to load the data in dev, qa, then production so the sequences and such change between the environments. I've dummied down the code to protect the customer; syntax and correctness of the code posted here (on the forum) is moot...it's only posted to give the framework for what I currently have.
Any advice would be greatly appreciated; how can I load the data faster knowing that I need to know sequence values for inserts into other tables?
DECLARE
v_inv_id invoice.invoice_id%TYPE;
v_inv_addr_id invoice_address.invoice_address_id%TYPE;
errString invoice_errors.sqlerrmsg%TYPE;
v_guid VARCHAR2 (128);
v_str VARCHAR2 (256);
v_err_loc NUMBER;
v_count NUMBER := 0;
l_start_time NUMBER;
TYPE rec IS RECORD
BILLING_TYPE VARCHAR2 (256),
CURRENCY VARCHAR2 (256),
BILLING_DOCUMENT VARCHAR2 (256),
DROP_SHIP_IND VARCHAR2 (256),
TO_PO_NUMBER VARCHAR2 (256),
TO_PURCHASE_ORDER VARCHAR2 (256),
DUE_DATE DATE,
BILL_DATE DATE,
TAX_AMT VARCHAR2 (256),
PAYER_CUSTOMER VARCHAR2 (256),
TO_ACCT_NO VARCHAR2 (256),
BILL_TO_ACCT_NO VARCHAR2 (256),
NET_AMOUNT VARCHAR2 (256),
NET_AMOUNT_CURRENCY VARCHAR2 (256),
ORDER_DT DATE,
TO_CUSTOMER VARCHAR2 (256),
TO_NAME VARCHAR2 (256),
FRANCHISES VARCHAR2 (4000),
UPDT_DT DATE
TYPE tab IS TABLE OF rec
INDEX BY BINARY_INTEGER;
pltab tab;
CURSOR c
IS
SELECT billing_type,
currency,
billing_document,
drop_ship_ind,
to_po_number,
to_purchase_order,
due_date,
bill_date,
tax_amt,
payer_customer,
to_acct_no,
bill_to_acct_no,
net_amount,
net_amount_currency,
order_dt,
to_customer,
to_name,
franchises,
updt_dt
FROM BACKFILL_INVOICES;
BEGIN
l_start_time := DBMS_UTILITY.get_time;
OPEN c;
LOOP
FETCH c
BULK COLLECT INTO pltab
LIMIT 1000;
v_err_loc := 1;
FOR i IN 1 .. pltab.COUNT
LOOP
BEGIN
v_inv_id := SEQ_INVOICE_ID.NEXTVAL;
v_guid := 'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff');
v_str := str_parser (pltab (i).FRANCHISES); --function to string parse - this could be done in advance, yes.
v_err_loc := 2;
v_count := v_count + 1;
INSERT INTO invoice nologging
VALUES (v_inv_id,
pltab (i).BILL_DATE,
v_guid,
'111111',
'NONE',
TO_TIMESTAMP (pltab (i).BILL_DATE),
TO_TIMESTAMP (pltab (i).UPDT_DT),
'READ',
'PAPER',
pltab (i).payer_customer,
v_str,
'111111');
v_err_loc := 3;
INSERT INTO invoice_header nologging
VALUES (v_inv_id,
TRIM (LEADING 0 FROM pltab (i).billing_document), --invoice_num
NULL,
pltab (i).BILL_DATE, --invoice_date
pltab (i).TO_PO_NUMBER,
NULL,
pltab (i).net_amount,
NULL,
pltab (i).tax_amt,
NULL,
NULL,
pltab (i).due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
TO_TIMESTAMP (SYSDATE),
TO_TIMESTAMP (SYSDATE),
PLTAB (I).NET_AMOUNT_CURRENCY,
(SELECT i.bc_value
FROM invsvc_owner.billing_codes i
WHERE i.bc_name = PLTAB (I).BILLING_TYPE),
PLTAB (I).BILL_DATE);
v_err_loc := 4;
INSERT INTO invoice_address nologging
VALUES (invsvc_owner.SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH INITIAL',
pltab (i).BILL_DATE,
NULL,
pltab (i).to_acct_no,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 5;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_ACCT_NO,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 6;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH2',
pltab (i).BILL_DATE,
NULL,
pltab (i).TO_CUSTOMER,
pltab (i).to_name,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 7;
INSERT INTO invoice_address nologging
VALUES ( SEQ_INVOICE_ADDRESS_ID.NEXTVAL,
v_inv_id,
'BLAH3',
pltab (i).BILL_DATE,
NULL,
'SOME PROPRIETARY DATA',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
NULL);
v_err_loc := 8;
INSERT
INTO invoice_event nologging (id,
eid,
root_eid,
invoice_number,
event_type,
event_email_address,
event_ts)
VALUES ( SEQ_INVOICE_EVENT_ID.NEXTVAL,
'111111',
'222222',
TRIM (LEADING 0 FROM pltab (i).billing_document),
'READ',
'some_user@some_company.com',
SYSTIMESTAMP);
v_err_loc := 9;
INSERT INTO backfill_invoice_mapping
VALUES (v_inv_id,
v_guid,
pltab (i).billing_document,
pltab (i).payer_customer,
pltab (i).net_amount);
IF v_count = 10000
THEN
COMMIT;
END IF;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (
pltab (i).billing_document,
pltab (i).payer_customer,
errString || ' ' || v_err_loc
COMMIT;
END;
END LOOP;
v_err_loc := 10;
INSERT INTO backfill_invoice_timing
VALUES (
ROUND ( (DBMS_UTILITY.get_time - l_start_time) / 100,
2)
|| ' seconds.',
(SELECT COUNT (1)
FROM backfill_invoice_mapping),
(SELECT COUNT (1)
FROM backfill_invoice_errors),
SYSDATE
COMMIT;
EXIT WHEN c%NOTFOUND;
END LOOP;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
errString := SQLERRM;
INSERT INTO backfill_invoice_errors
VALUES (NULL, NULL, errString || ' ' || v_err_loc);
COMMIT;
END;Hello
You could use insert all in your case and make use of sequence.NEXTVAL and sequence.CURRVAL like so (excuse any typos - I can't test without table definitions). I've done the first 2 tables, so it's just a matter of adding the rest in...
INSERT ALL
INTO invoice nologging
VALUES ( SEQ_INVOICE_ID.NEXTVAL,
BILL_DATE,
my_guid,
'111111',
'NONE',
CAST(BILL_DATE AS TIMESTAMP),
CAST(UPDT_DT AS TIMESTAMP),
'READ',
'PAPER',
payer_customer,
parsed_francises,
'111111'
INTO invoice_header
VALUES ( SEQ_INVOICE_ID.CURRVAL,
TRIM (LEADING 0 FROM billing_document), --invoice_num
NULL,
BILL_DATE, --invoice_date
TO_PO_NUMBER,
NULL,
net_amount,
NULL,
tax_amt,
NULL,
NULL,
due_date,
NULL,
NULL,
NULL,
NULL,
NULL,
SYSTIMESTAMP,
SYSTIMESTAMP,
NET_AMOUNT_CURRENCY,
bc_value,
BILL_DATE)
SELECT
src.billing_type,
src.currency,
src.billing_document,
src.drop_ship_ind,
src.to_po_number,
src.to_purchase_order,
src.due_date,
src.bill_date,
src.tax_amt,
src.payer_customer,
src.to_acct_no,
src.bill_to_acct_no,
src.net_amount,
src.net_amount_currency,
src.order_dt,
src.to_customer,
src.to_name,
src.franchises,
src.updt_dt,
str_parser (src.FRANCHISES) parsed_franchises,
'import' || TO_CHAR (CURRENT_TIMESTAMP, 'hhmissff') my_guid,
i.bc_value
FROM BACKFILL_INVOICES src,
invsvc_owner.billing_codes i
WHERE i.bc_name = src.BILLING_TYPE;Some things to note
1. Don't commit in a loop - you only add to the run time and load on the box ultimately reducing scalability and removing transactional integrity. Commit once at the end of the job.
2. Make sure you specify the list of columns you are inserting into as well as the values or columns you are selecting. This is good practice as it protects your code from compilation issues in the event of new columns being added to tables. Also it makes it very clear what you are inserting where.
3. If you use WHEN OTHERS THEN... to log something, make sure you either rollback or raise the exception. What you have done in your code is say - I don't care what the problem is, just commit whatever has been done. This is not good practice.
HTH
David
Edited by: Bravid on Oct 13, 2011 4:35 PM -
My iphone battery died and on charging the phone it asked me to connect to itunes and restore the phone.
If i restore the phone how can i get my data back and how can i check when i last backed up my phoneIf you have been syncing regularly as the iphone is designed, then you can sync the data back.
Regardless you will have to restore the iphone. -
I lost my iPhone device, how can I get my data back on another one without using an iCloud backup just back up on i Tunes, Please Help.??
You can find the backup files and then copy them to a safe place if you are worrying about this.
iTunes places the backup files in these places:
Mac: ~/Library/Application Support/MobileSync/Backup/
The "~" represents your Home folder. If you don't see Library in your Home folder, hold Option and click the Go menu.
Windows Vista, Windows 7, and Windows 8: \Users\(username)\AppData\Roaming\Apple Computer\MobileSync\Backup\
To quickly access the AppData folder, click Start. In the search bar, type %appdata%, then press Return.
Windows XP: \Documents and Settings\(username)\Application Data\Apple Computer\MobileSync\Backup\
To quickly access the Application Data folder, click Start, then choose Run. In the search bar, type %appdata%, then click OK. -
How can we give the Data Format (File Type ) in Runtime
Hi all,
How can we give the Data Format (File Type ) in Runtime for the following method,
cl_gui_frontend_services=>gui_download.
Thanks in advance
SriThere is a filetype parameter which you can set
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
* BIN_FILESIZE =
filename =
* FILETYPE = 'ASC'
* APPEND = SPACE
* WRITE_FIELD_SEPARATOR = SPACE
* HEADER = '00'
* TRUNC_TRAILING_BLANKS = SPACE
* WRITE_LF = 'X'
* COL_SELECT = SPACE
* COL_SELECT_MASK = SPACE
* DAT_MODE = SPACE
* CONFIRM_OVERWRITE = SPACE
* NO_AUTH_CHECK = SPACE
* CODEPAGE = SPACE
* IGNORE_CERR = ABAP_TRUE
* REPLACEMENT = '#'
* WRITE_BOM = SPACE
* TRUNC_TRAILING_BLANKS_EOL = 'X'
* IMPORTING
* FILELENGTH =
changing
data_tab =
* EXCEPTIONS
* FILE_WRITE_ERROR = 1
* NO_BATCH = 2
* GUI_REFUSE_FILETRANSFER = 3
* INVALID_TYPE = 4
* NO_AUTHORITY = 5
* UNKNOWN_ERROR = 6
* HEADER_NOT_ALLOWED = 7
* SEPARATOR_NOT_ALLOWED = 8
* FILESIZE_NOT_ALLOWED = 9
* HEADER_TOO_LONG = 10
* DP_ERROR_CREATE = 11
* DP_ERROR_SEND = 12
* DP_ERROR_WRITE = 13
* UNKNOWN_DP_ERROR = 14
* ACCESS_DENIED = 15
* DP_OUT_OF_MEMORY = 16
* DISK_FULL = 17
* DP_TIMEOUT = 18
* FILE_NOT_FOUND = 19
* DATAPROVIDER_EXCEPTION = 20
* CONTROL_FLUSH_ERROR = 21
* NOT_SUPPORTED_BY_GUI = 22
* ERROR_NO_GUI = 23
* others = 24 -
HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS
Hai Frnds,
i Attend an interview they asked this questions can u know the answeres . tell me .
In File to file scenario how can we reprocess records which failed records.
HOW CAN U CORRECT THE DATA IN UR FILE WHICH CONTAINS 1 LAKSH RECS
Thanks in advance
thahirHi,
Refer these links:
this might help you
Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
Generic Approach for Validating Incoming Flat File in SAP XI - Part 1
validating against schema file for the output XML file
Informing the sender about bad records
Regards,
Nithiyanandam -
How can we view the data asociated with Request ID
Hi All,
I have data loaded in an ODS there are multiple files loaded in this ODS. Now i want to view data for a perticuler request OR i want to know how can we know the data associated with a perticular request.
Please help me out.
Thanks & Regards
Amit KumarCopy the request number (not request ID) from the ODS manage screen, Goto RSRQ give the request number and execute. it shows the monitor screen- now goto PSA from the top and check the data. But this possible only if you are loading data to PSA also along with ODS.
Otherwise, Goto Display Data of ODS from the right click on it -- in the selection screen give the Request ID that you want to check the data. Then it displays only that request data.
Hope this helps.
Veerendra.
Edited by: denduluri veerendra kumar on Dec 1, 2009 12:40 PM
Edited by: denduluri veerendra kumar on Dec 1, 2009 12:43 PM -
How can I restore my data from iCal? I didn't make any backup, but I use time machine with an external HD. I deleted iCal when I deleted my gmail account. I have tried to restore, but I can only restore the iCal software and not the data.
So what is your question?
If you forgot your encryption password:
Warning: Make sure it's a password you will remember or write it down for safekeeping. If you encrypt an iPhone backup in iTunes and forget your password, you can't restore from backup and your data will be unrecoverable.
If you can't remember the password and want to start again, you must perform a full software restore and chooseset up as a new device when iTunes prompts you to select the backup from which to restore.
The above comes from here:
http://support.apple.com/kb/HT4946 -
I have 1 apple id for iTunes store and a different one for my iCloud acct. How can I watch my photo stream on apple tv and be connected to the iTunes store
Use the same Apple ID for everything.
-
How can I display the data in table in separate column?
I have a vi reading data one by one in the same column.
How can I display the data with separate column?
like this:
data 1 | read | read
data 2 | read | read
data 3 | read | read
(would you mind if I will ask for an example
because it is much easier for me to work
with an example)
THANK YOU.If you're reading your data in as a 1D array, this is as simple as using the Reshape Array to make a 2D array. I've attached an example in LabVIEW 6.1 format. The example rearranges a single column of data fill several columns horizontally, but you can easily modify this code to fill the columns downward instead.
Attachments:
Data_Column_Example.vi 18 KB -
How can I custom my date in OBIEE.
How can I custom my date in OBIEE.I want to see date in my user friendly format for Date Format MM/DD/YYYY to filter with
leading zero(number) eg (01.21.2008) and not M/D/YYYY (1.21.2008) that i am seeing.I would appreciate it if you could give me a step by step process on how to do it in RPD.I know how to change the data format in my column propeties since i have more that 5000 columns that need changed.I am looking for a localised area
that can take care of business.
ThanksEdit the following parameters in OracleBI\web\config\localedefinitions.xml
- Search for the locale that you want to customize by looking for the tag *<localeDefinition name="en">*
- Customize the following tags as you require
<property name="dateShortFormat">MM/DD/YYYY</property>
<property name="dateLongFormat">dddd, MMMM dd, yyyy</property>
- Restart the presentation server -
I use a translation stage for the experiment.For each user in the lab the stage position (to start an experiment) is different.I defined one end of the stage as zero. I want to save the position , date and time of the stage with respect to zero.I want all these in one file, nd everytime I run it it should save to the same file, like this:
2/12/03 16:04 13567
2/13/03 10:15 35678
So I will track the position from day to day.If naybody helps, I appreciate it.Thanks.evolution wrote in message news:<[email protected]>...
> How can I save my data and the date,the time into the same file when
> I run this VI at different times?
>
> I use a translation stage for the experiment.For each user in the lab
> the stage position (to start an experiment) is different.I defined one
> end of the stage as zero. I want to save the position , date and time
> of the stage with respect to zero.I want all these in one file, nd
> everytime I run it it should save to the same file, like this:
> 2/12/03 16:04 13567
> 2/13/03 10:15 35678
>
> So I will track the position from day to day.If naybody helps, I
> appreciate it.Thanks.
Hi,
I know the function "write to spreadsheet file.vi"
can append the data
to file. You can use the "concatenate strings" to display the date,
time as well as data... Hope this help.
Regards,
celery -
Me and my siblings all want our own apple ids, and my mom has the apple id that has all of our games, apps, movies, and music on there. how can we copy the data onone apple id to the three kid accounts?
thanks!Sorry, but unless I misunderstand what you're asking, you can't. Purchases from the iTunes Store are permanently tied to the Apple ID through which they were purchased. If your parents want you to be completely independent of their Apple ID and iTunes Store account, you'll each have to re-purchase the apps, etc. Otherwise they'll have to continue to allow you access to their account, or will have to do all the updates for you.
Regards.
Maybe you are looking for
-
Hi Gurus, When i create a Shopping cart and approve it , i can see the purchase order created against in the item display , but if i want to write a program to find out the follow on documents against a shopping cart , which table should i use ? is
-
How to find the column name and table name with a value
Hi All How to find the column name and table name with "Value". For Example i have value named "Srikkanth" This value will be stored in one table and in one column i we dont know the table how to find the table name and column name Any help is highly
-
How can I switch a book purchase to an audio book purchase?
Please help me figure out how to switch an iTunes "book" purchase to an "Audio-Book" purchase! I can't believe I made this mistake and want to exchange or cancel the book purchase and then buy the audio book version as new purchase. HELP Please - I f
-
Hello. I'm facing problem during client connection throungth proxy. The error messagge is: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 302 Moved Temporarily" at sun.net.www.protocol.http.HttpURLConnection.doTunne
-
Earphones not working on iTouch 4g
I have plugged my earphones into my iTouch 4g but the sounds keep coming out of my internal speakers (and not my earphones). please help