Importare immagini da file

Discussioni generali sulla programmazione in LabVIEW, domande, problemi e soluzioni.

Moderatore: ILVG mod

Importare immagini da file

Messaggioda Paperinik » lun mag 14, 2012 11:03 am

Ciao a tutti, altra domanda..
Sto creando un'applicazione e vorrei che in ogni front panel comparisse il logo dell'azienda. Il logo è un file *.jpg
Ho provato con il comando Edit -> Import picture from file ma mi da sempre l'errore
"LabVIEW could not import the picture. Possible reasons include:
-Corrupt file or invalid picture type.
-File used by another application.
-Not enough memory"

Sbaglio qualcosa ? Esiste un altro metodo....tipo copia e incolla ?

Ciao e grazie
Paperinik
Nuovo Utente
Nuovo Utente
 
Messaggi: 18
Iscritto il: gio mar 01, 2012 6:21 pm

Re: Importare immagini da file

Messaggioda gepponline » lun mag 14, 2012 4:21 pm

trascina l'immagien sul front panel.
..ma ciao!
Immagine
Avatar utente
gepponline
Moderatore
 
Messaggi: 1626
Iscritto il: ven gen 28, 2005 11:27 am
Località: Monticello Brianza

Re: Importare immagini da file

Messaggioda Paperinik » lun mag 14, 2012 4:55 pm

Ciao, ho provato ma non succede nulla.
Paperinik
Nuovo Utente
Nuovo Utente
 
Messaggi: 18
Iscritto il: gio mar 01, 2012 6:21 pm

Re: Importare immagini da file

Messaggioda gepponline » mar mag 15, 2012 8:49 am

sei sicuro che l'immagine sia jpg?
Sei sicuro che l'immagien non occupi millemila mega?
perchè confermo che con i jpg, cosi' come con altri formati comuni, batsa trascinare il file sul front panel (quindi dal file manager, non da un editor di immagini)
..ma ciao!
Immagine
Avatar utente
gepponline
Moderatore
 
Messaggi: 1626
Iscritto il: ven gen 28, 2005 11:27 am
Località: Monticello Brianza

Re: Importare immagini da file

Messaggioda Paperinik » mar mag 15, 2012 11:35 am

Ciao,
sì sì l'immagine è jpg e anche molto leggera (100 K).
Ho provato anche con altre ma il risultato non cambia..dov'è il trucco ?

Grazie
Paperinik
Nuovo Utente
Nuovo Utente
 
Messaggi: 18
Iscritto il: gio mar 01, 2012 6:21 pm

Re: Importare immagini da file

Messaggioda gepponline » mar mag 15, 2012 12:17 pm

proviamo per passi:
1)apri esplora risorse
2)apri labview e crei un vi vuoto
3) visualizza affiancati il front panel del vi e l'esplora risorse
4) seleziona l'immagine che vuoi e trascinala sul front panel.
5) L'icona del mouse si dovrebbe trasformare in un quadratino con un +
6) se il tipo di immagiennon è supportata invece l'icona del mouse si deve trasormare in un simbolo di divieto.
..ma ciao!
Immagine
Avatar utente
gepponline
Moderatore
 
Messaggi: 1626
Iscritto il: ven gen 28, 2005 11:27 am
Località: Monticello Brianza

Re: Importare immagini da file

Messaggioda Paperinik » mar mag 15, 2012 3:22 pm

Ciao, fatto esattamente come suggerito, l'icona del mouse si trasforma effettivamente in un quadratino con il + ma l'immagine non viene copiata.
Io sto usando LW 6.1....non so magari c'entra qualcosa.

Grazie
Paperinik
Nuovo Utente
Nuovo Utente
 
Messaggi: 18
Iscritto il: gio mar 01, 2012 6:21 pm

Re: Importare immagini da file

Messaggioda gepponline » mer mag 16, 2012 8:38 am

hai provato con un altra immagine piccola sia come peso che come dimensioni?
Eventualmente prova a convertirla in PNG o in gif..
..ma ciao!
Immagine
Avatar utente
gepponline
Moderatore
 
Messaggi: 1626
Iscritto il: ven gen 28, 2005 11:27 am
Località: Monticello Brianza

Re: Importare immagini da file

Messaggioda Paperinik » mer mag 16, 2012 3:11 pm

Risolto...ho convertito l'immagine iniziale in *gif e in effetti l'ha copiata.
Ho poi provato con altre immagini jpg molto leggere (45K max) ma non cambia nulla, non le copia.

Grazie mille
Paperinik
Nuovo Utente
Nuovo Utente
 
Messaggi: 18
Iscritto il: gio mar 01, 2012 6:21 pm

Re: Importare immagini da file

Messaggioda gepponline » mer mag 16, 2012 3:52 pm

a sto punto ho il sospetto che nella versione 6.1 i jpg non fossero compatibili...
..ma ciao!
Immagine
Avatar utente
gepponline
Moderatore
 
Messaggi: 1626
Iscritto il: ven gen 28, 2005 11:27 am
Località: Monticello Brianza

Re: Importare immagini da file

Messaggioda paracarro » gio mag 17, 2012 10:14 am

Paperinik ha scritto:Risolto...ho convertito l'immagine iniziale in *gif e in effetti l'ha copiata.
Ho poi provato con altre immagini jpg molto leggere (45K max) ma non cambia nulla, non le copia.

Grazie mille

nell help di LaBVIEW 6.1 ho trovato questo:
Codice: Seleziona tutto
Using Imported Graphics in LabVIEW
You can import graphics from other applications to use as front panel backgrounds, items in ring controls, and parts of other controls and indicators. Refer to the Custom Controls and Type Definitions Application Note for more information about using graphics in controls.

LabVIEW supports most standard graphic formats, including animated GIF, MNG, animated MNG, and PNG. LabVIEW also supports transparency.

Use one of the following methods to import a graphic.

Windows

Macintosh

UNIX

After you import a graphic, you might need to resize or reorder it.

Selezionando "Windows" si ottiene la seguente pagina:
Codice: Seleziona tutto
Importing Graphics in Windows
You can import an image from a graphics application, drag and drop an image file into LabVIEW, or use the Edit»Import Picture from File menu item.

Complete the following steps to import an image from a graphics application. You can import any image format your graphics application supports, except animated images.

1-In your graphics editing application or Web browser, copy an image to the clipboard.
2-Switch to LabVIEW. The image is automatically available on the LabVIEW clipboard.
3-Place your cursor in the place you want to paste the image.
4-Select Edit»Paste to place the image in LabVIEW.

Complete the following steps to drag a graphics file (CLP, EMF, WMF, BMP, or animated) from Windows Explorer and place it in LabVIEW.

1-In Windows Explorer, select the graphics file you want to import.
2-Drag the file into the LabVIEW window and place the cursor where you want to paste it.
3-Release the mouse button. The image from the file appears in LabVIEW.

Complete the following steps to import a graphic (CLP, EMF, WMF, BMP, or animated) using the LabVIEW import picture from file feature.

1-Select Edit»Import Picture from File.
2-Use the dialog box that appears to navigate to the image file you want to import. Select the file and click the OK button.
3-Place your cursor in the place you want to paste the image.
4-Select Edit»Paste in LabVIEW.


Infine è possibile importare immagini .jpg in LaBVIEW 6.1 ma solamente dentro un "Picture Control" utilizzando le apposite funzioni
JPG_import.JPG
Read jpg labview 6.1


bye
Ti ringrazio per la domanda...
Come Tu mi insegni...
M.Marassi
Il futuro è già passato.
Il presente non esiste
C.Russo
paracarro
Moderatore
 
Messaggi: 700
Iscritto il: lun ago 18, 2003 3:04 pm
Località: MILANO


Torna a Programmazione

Chi c’è in linea

Visitano il forum: Google [Bot] e 2 ospiti

Pannello di Controllo Utente

Login

Chi c’è in linea

In totale ci sono 3 utenti connessi :: 1 iscritto, 0 nascosti e 2 ospiti (basato sugli utenti attivi negli ultimi 5 minuti)
Record di utenti connessi: 119 registrato il dom mar 31, 2013 11:39 pm

Visitano il forum: Google [Bot] e 2 ospiti