PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.c > C graphics image to JPEG
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
C graphics image to JPEG

Réponse
 
LinkBack Outils de la discussion
Vieux 07/05/2008, 17h08   #1
jt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut C graphics image to JPEG

hey guys..
can anybody suggest a code tht would save the graphics image saved in
C to jpg file.
is it available in the net.
plz tell the links.
  Réponse avec citation
Vieux 07/05/2008, 18h09   #2
Jens Thoms Toerring
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: C graphics image to JPEG

jt <karthiks.840@gmail.com> wrote:
> can anybody suggest a code tht would save the graphics image saved in
> C to jpg file.
> is it available in the net.


Just search for "libjpeg" and one of the first results is

http://www.ijg.org/
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
  Réponse avec citation
Vieux 07/05/2008, 18h13   #3
Morris Dovey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: C graphics image to JPEG

jt wrote:
> hey guys..
> can anybody suggest a code tht would save the graphics image saved in
> C to jpg file.
> is it available in the net.
> plz tell the links.


If you already have the data in your C program, all you need to do is
use fopen() to open the file, fwrite() to move the data into the file,
and fclose() to finish.

Much easier than you were expecting, yes?

--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto/
  Réponse avec citation
Vieux 07/05/2008, 18h24   #4
Richard Tobin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: C graphics image to JPEG

In article <68e61sF2s5ihaU2@mid.uni-berlin.de>,
Jens Thoms Toerring <jt@toerring.de> wrote:

>> can anybody suggest a code tht would save the graphics image saved in
>> C to jpg file.
>> is it available in the net.


>Just search for "libjpeg" and one of the first results is
>
>http://www.ijg.org/


And you quite likely already have a JPEG library on your computer,
so you may not need to install it.

-- Richard
--
:wq
  Réponse avec citation
Vieux 07/05/2008, 18h31   #5
soscpd@terra.com.br
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: C graphics image to JPEG

On May 7, 12:08pm, jt <karthiks....@gmail.com> wrote:
> hey guys..

Heey Jt... what's up?

> can anybody suggest a code tht would save the graphics image saved in
> C to jpg file.


Save what "graphics"? Where? Isn't that already saved on the jpeg
file? Damn graphics...

You probably need to know more about the subject to improove your
question. Try to figure what exactly you wish to do with the image
data (there is a little universe here, and people can only guess.
Maybe you wish to use the pixel's RGB some way, some where. Who
knows?). Then, figure if the provided link (donw in the message body)
doesn't show you up some light. Then, as you already know (I presume)
what you have to do, try to know more about the stuff this guys have
on this site - http://www.ijg.org. If the final result left any
questions about the C implementation of your project, after search
again with this new subject in the down link, you can post your
question with more chances to get from me, at least, a answer usefull
to your project.

> is it available in the net.

I am sure it is, and you will find out, soon as you know what you are
looking for. To be honest, this task is far away the hard one in (my
experience) all projects.

> plz tell the links.

Jt.... you didn't save that much time. Write the whole word. Please.
http://www.google.com

Regards
Rafael
  Réponse avec citation
Vieux 07/05/2008, 20h55   #6
Malcolm McLean
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: C graphics image to JPEG

"jt" <karthiks.840@gmail.com> wrote in message news:
> hey guys..
> can anybody suggest a code tht would save the graphics image saved in
> C to jpg file.
> is it available in the net.
> plz tell the links.
>

The code you are looking for is on my website. More or less. You'll probably
want to play about with the compression ratio by manipulating the
quantisation.

Look under Basic Algorithms, sample code.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm

  Réponse avec citation
Vieux 08/05/2008, 07h37   #7
cr88192
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: C graphics image to JPEG


"Morris Dovey" <mrdovey@iedu.com> wrote in message
news:4821e36f$0$89866$815e3792@news.qwest.net...
> jt wrote:
>> hey guys..
>> can anybody suggest a code tht would save the graphics image saved in
>> C to jpg file.
>> is it available in the net.
>> plz tell the links.

>
> If you already have the data in your C program, all you need to do is use
> fopen() to open the file, fwrite() to move the data into the file, and
> fclose() to finish.
>
> Much easier than you were expecting, yes?
>


if you have a valid jpeg bitstream in the buffer, but if it is actual
graphical data (say, an image rendered into a buffer), then a little more is
needed than this.

as noted by others, IJG's libjpeg is a common option for loading/saving jpeg
files.

at least a few of us here have written custom load/save code as well (the
advantage of going this route is that one can do a single-file
implementation of the thing and avoid the dependency/liscense/bulk/...
issues involved with using a 3rd party library).

of course, be warned that writing code to encode/decode a jpeg bitstream
isn't exactly a newbie friendly task (at least a few of us are probably also
likely to make such code available on request as well).

my particular case:
I can send my version if asked via email.


I have been using it fairly effectively for both encoding and decoding for a
few years now.

it also has a faster encoder (lower quality/conpression tradeoff), which was
tweaked mostly for the task of encoding images to be used in MJPEG videos
(basically, when I was trying to minimize the performance impact when doing
real-time video recording/encoding in my apps, albeit glReadPixels is the
main bottleneck IME).

or such...


> --
> Morris Dovey
> DeSoto Solar
> DeSoto, Iowa USA
> http://www.iedu.com/DeSoto/



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h43.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14661 seconds with 15 queries