About 14,300,000 results
Open links in new tab
  1. c - How would I use an array to print an image? - Stack Overflow

    May 20, 2014 · Are you trying to take an array of RGB's and output an image file or are you trying to find a way to display an array image to the screen? You will need to get familiar with the PPM file format and compression (if any). Once you have the array, you can use fopen() to create an output file and write the array in the correct format using fwrite().

  2. Read an image file in C/C++ into an array - Stack Overflow

    Here's the code that you need to read images: int width, height, bpp; uint8_t* rgb_image = stbi_load("image.png", &width, &height, &bpp, 3); stbi_image_free(rgb_image); return 0; And here's the code to write an image: int width = 800; . int height = 800; uint8_t* rgb_image; rgb_image = malloc(width*height*CHANNEL_NUM);

  3. C Programming: Image manipulations with arrays - YouTube

    We'll apply array algorithms to transform images: darken, flip, mirror, change to grayscale, and more.

  4. C Programming - Reading and writing images with the stb_image

    Jun 10, 2019 · In this article I will show you how to read and write images with the stb_image libraries. In order to exemplify the usage of the library I’ll demo how to convert an image to gray and how to apply a sepia filter to the image. As a side note, the C code from this article is compatible with any modern C compilers like GCC, Clang and MSVC.

  5. Arrays in C are contiguous blocks of memory with a fixed length. A programmer can access elements in an array using either bracket notation (e.g., arr[2]) or by dereferencing an offset from the beginning of the array (e.g., *(arr + 2), more on this in a couple of slides).

    Missing:

    • Visual Images

    Must include:

  6. C Arrays - GeeksforGeeks

    Apr 24, 2025 · We can declare an array by specifying its name, the type of its elements, and the size of its dimensions. When we declare an array in C, the compiler allocates the memory block of the specified size to the array name. Create an array with the name array_name, and it can store a specified number of elements of the same data type. Example:

    Missing:

    • Visual Images

    Must include:

  7. C Arrays (With Examples) - Programiz

    You will learn to declare, initialize and access array elements of an array with the help of examples. An array is a variable that can store multiple values. Learn to code solving problems and writing code with our hands-on C Programming course.

    Missing:

    • Visual Images

    Must include:

  8. Multidimensional Arrays in C – 2D and 3D Arrays - GeeksforGeeks

    Jan 10, 2025 · A two-dimensional array or 2D array is the simplest form of the multidimensional array. We can visualize a two-dimensional array as one-dimensional arrays stacked vertically forming a table with ‘m’ rows and ‘n’ columns.

    Missing:

    • Visual Images

    Must include:

  9. C Programming turning array into an image - Stack Overflow

    Oct 23, 2015 · You could try to use OpenCv, an Open source library of programming functions for computer vision tasks. It could read and write on diferent image file formats using imread and imwrite functions, as you could see on this example from OpenCv's documentation web site: char* imageName = argv[1]; Mat image; image = imread( imageName, 1 );

  10. Read image data from an image to array - C++ Programming

    I would like to read a PNG image file using C (a c++ code is also acceptable) and store the data in an array. Does anyone know a library or bunch of code or a blueprint for how to do that?

  11. Some results have been removed
Refresh