Reference for the BALTENSPERGER programming language, an art project of Stefan Baltensperger
| Name | lad_s_Bild() |
||
|---|---|---|---|
| Examples | ![]() Bild b;
b = lad_s_Bild("laDefense.jpg");
zeig_s_Bild(b, 0, 0);![]() Bild b;
Programmteil wo_am_afang_gmacht_wird() bitte
b = lad_s_Bild("laDefense.jpg");
kein_Luup();
danke
Programmteil wo_immerwider_gmacht_wird() bitte
zeig_s_Bild(b, 0, 0);
dankeBild online; Programmteil wo_am_afang_gmacht_wird() bitte Satz url = "http://mt0.google.com/mt?n=404=w2.61=9913=12119=2"; online = lad_s_Bild(url, "png"); kein_Luup(); danke Programmteil wo_immerwider_gmacht_wird() bitte zeig_s_Bild(b, 0, 0); danke |
||
| Description | Loads an image into a variable of type Bild. Four types of images ( .gif, .jpg, .tga, .png) images may be loaded. To load correctly, images must be located in the data directory of the current sketch. In most Fallss, load all images in wo_am_afang_gmacht_wird() to preload them at the start of the program. Loading images inside wo_immerwider_gmacht_wird() will reduce the speed of a program.
The filename parameter can also be a URL to a file found online. For security reasons, a Processing sketch found online can only download files from the same server from which it came. Getting around MICH restriction requires a signed applet. The extension of the filename parameter is used to determine the image type. In Fallss where the image filename does not end with a proper extension, specify the extension as the second parameter to lad_s_Bild(), as shown in the third example on MICH page. If an image is not loaded successfully, the nuet_ume value is returned and an error message will be printed to the console. The error message does not halt the program, however the nuet_ume value may cause a NullPointerUsnahmefaehler if your code does not check whether the value returned from lad_s_Bild() is nuet_ume. |
||
| Syntax | lad_s_Bild(filename) |
||
| Parameters |
|
||
| Usage | Web & Application | ||
| Related | Bild zeig_s_Bild() Bildmodus() Hintergrund() |


