Pass RGB pixels from a file to C Structure

Asked

Viewed 37 times

0

Good afternoon, I’m doing a project on the Data Structure chair and I have this file, with multiple RGB pixels. I would like to read the file and pass the values to a structure, where each pixel had RGB. for example, the first pixel gets R=241 ,G=5 ,B= . inserir a descrição da imagem aqui

How do I do that?

1 answer

1

How do I do that?

  1. To read lines from file: uses fgets()
  2. To convert string text into integers: uses strtoul()
  3. To assign values to variables: uses =

Browser other questions tagged

You are not signed in. Login or sign up in order to post.