Using the File Chooser Widget to open an image
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 45/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Ambito
- documentation
Direzione di ricerca
Review documentation section §6.13 alongside the issue's description of the _Object class, Pathname values, and the fn.value access pattern. Document the missing _Object section and the File Chooser workflow so users can understand how to pass a selected PNG to Image_file.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I wanted to use the File Chooser Widget to open one of several image (PNG) files for further analysis with nip2. The "obvious" approach of using the output from the File Chooser widget to open a file did not seem to work. After spending some time examining the nip2 code, I was able to get a working system, which I am documenting here because it may be of use to others. The first thing to note is that the file chooser widget returns an object by calling the function Pathname (see below)
/* An editable filename.
*/
Pathname caption value = class
_Object {
_check_args = [
[caption, "caption", check_string],
[value, "value", check_string]
];
}
It is therefore necessary to extract the 'value' member of this object. To do this, I wrote a small nip2 toolkit extension, as follows:
// Load an Image File
loadFile fn
= Image_file fn.value;
In the toolkit editor, it looks as follows:

I was then able to connect the two together, using the standard nip2 graphical editor:

After this step, I could choose the file I wanted to load and then process it further. I hope that this helps others.
One small comment about the nip2 documentation. The section §6.13, which should document the _Object class is empty!
- Lingua principale
- C
- Stelle
- 428
- Fork
- 17
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libvips/nip2
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
-
Help: Filter_paint_text_item, Removing source related Place-Region's in cell copies ?. (nip2-8.7.1)Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Cell-Button coloring.Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di libvips/nip2
Issue simili
-
bug intrinsic medium priority rt_lib
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
[CLI] Clarify distinction between 'capture camera' and 'capture screen' in help text and outputAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
espressif/esp-vision#18 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
sumatrapdfreader/sumatrapdf#6417 · 3 commenti ·
-
[BUG] Cython cache evicts most recent instead of oldest entry on cleanupForse già presa @scoder l’ha presa oggi. ApertaBuild System defect
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 61/100
HexaCluster/credcheck#94 ·