Exemple #1
0
 /** Array version of: {@link #stbi_info_from_callbacks info_from_callbacks} */
 public static int stbi_info_from_callbacks(
     STBIIOCallbacks clbk, long user, int[] x, int[] y, int[] comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
     STBIIOCallbacks.validate(clbk.address());
   }
   return nstbi_info_from_callbacks(clbk.address(), user, x, y, comp);
 }
Exemple #2
0
 /**
  * Callback version of {@link #stbi_info info}.
  *
  * @param clbk an {@link STBIIOCallbacks} struct
  * @param user a pointer to user data
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  */
 public static int stbi_info_from_callbacks(
     STBIIOCallbacks clbk, long user, IntBuffer x, IntBuffer y, IntBuffer comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
     STBIIOCallbacks.validate(clbk.address());
   }
   return nstbi_info_from_callbacks(
       clbk.address(), user, memAddress(x), memAddress(y), memAddress(comp));
 }
Exemple #3
0
 /**
  * Floating-point version of {@link #stbi_load_from_callbacks load_from_callbacks}.
  *
  * @param clbk an {@link STBIIOCallbacks} struct
  * @param user a pointer to user data
  * @param x outputs the image width in pixels
  * @param y outputs the image height in pixels
  * @param comp outputs number of components in image
  * @param req_comp 0 or 1..4 to force that many components per pixel. One of:<br>
  *     <table><tr><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td></tr></table>
  */
 public static FloatBuffer stbi_loadf_from_callbacks(
     STBIIOCallbacks clbk, long user, IntBuffer x, IntBuffer y, IntBuffer comp, int req_comp) {
   if (CHECKS) {
     checkBuffer(x, 1);
     checkBuffer(y, 1);
     checkBuffer(comp, 1);
     STBIIOCallbacks.validate(clbk.address());
   }
   long __result =
       nstbi_loadf_from_callbacks(
           clbk.address(), user, memAddress(x), memAddress(y), memAddress(comp), req_comp);
   return memFloatBuffer(
       __result, x.get(x.position()) * y.get(y.position()) * comp.get(comp.position()));
 }
Exemple #4
0
 /**
  * Callback version of {@link #stbi_is_hdr is_hdr}.
  *
  * @param clbk an {@link STBIIOCallbacks} struct
  * @param user a pointer to user data
  */
 public static int stbi_is_hdr_from_callbacks(STBIIOCallbacks clbk, long user) {
   if (CHECKS) STBIIOCallbacks.validate(clbk.address());
   return nstbi_is_hdr_from_callbacks(clbk.address(), user);
 }