Author Topic: Immages in C  (Read 433 times)

MauryG5

  • Hero Member
  • *****
  • Posts: 783
  • Karma: +22/-1
    • View Profile
Immages in C
« on: May 04, 2025, 04:30:27 pm »
Sorry guys, I was trying to insert images in jpg format in a code written in C, but I can't figure out how to do it. I've read various information on the net but nothing that is really useful. I was wondering if it is possible to load images using C as a programming language...

ClassicHasClass

  • Hero Member
  • *****
  • Posts: 501
  • Karma: +40/-0
  • Talospace Earth Orbit
    • View Profile
    • Floodgap
Re: Immages in C
« Reply #1 on: May 04, 2025, 09:23:52 pm »
Yes, with libjpeg. Works pretty much anywhere.

MauryG5

  • Hero Member
  • *****
  • Posts: 783
  • Karma: +22/-1
    • View Profile
Re: Immages in C
« Reply #2 on: May 05, 2025, 12:56:15 am »
Hi Classic, thank you for the information, I knew I could count on you. Listen, is there a general procedure or a written code to understand in detail how to write? Always thanks

ClassicHasClass

  • Hero Member
  • *****
  • Posts: 501
  • Karma: +40/-0
  • Talospace Earth Orbit
    • View Profile
    • Floodgap
Re: Immages in C
« Reply #3 on: May 05, 2025, 08:51:39 pm »
Something like this would give you a starting point: https://github.com/bitristan/libjpeg-sample/tree/master

MauryG5

  • Hero Member
  • *****
  • Posts: 783
  • Karma: +22/-1
    • View Profile
Re: Immages in C
« Reply #4 on: May 06, 2025, 12:18:46 am »
Yes perfect thanks, yesterday I looked on github but I hadn't found this part yet. Above all I have to understand how to enter the path each time to make it send the photos I have to display to the screen. It seems that for each new photo I have to write all these lines of code, good work then... ;D

MauryG5

  • Hero Member
  • *****
  • Posts: 783
  • Karma: +22/-1
    • View Profile
Re: Immages in C
« Reply #5 on: May 06, 2025, 03:51:11 pm »
I rewrote all that example code and entered the width and height in the required parameters, those of a photo that I'm trying to run.

Now I managed to get it to start, I made a mistake in the startup file after compiling and then I didn't understand where to put my file. I managed to get the image to start, everything is,
thank you very much Classic!
« Last Edit: May 06, 2025, 04:15:11 pm by MauryG5 »