๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.sources.d
Article #203

Re: ppmtogif-noLZW.c

#203
From: IIJIMA Hiromitsu
Date: Wed, 17 Oct 2001 13:34
32 lines
2366 bytes
ใ„ใ„ใ˜ใพใงใ™ใ€‚

> ใƒปๆจ™ๆบ–ๅ…ฅๅŠ›ใ‹ใ‚‰ppmใ‚’้ฃŸใฃใฆ
> ใƒปๆจ™ๆบ–ๅ‡บๅŠ›ใซใƒฉใƒณใƒฌใƒณใ‚ฐใ‚นGIFใ‚’ๅใ
> 
> ๏ผฃใƒ—ใƒญใ‚ฐใƒฉใƒ ใงใ™ใ€‚
> ๆ„ๅค–ใซใใ†ใ„ใฃใŸใƒ„ใƒผใƒซใŒใชใ‹ใฃใŸใฎใงไฝœใ‚Šใพใ—ใŸใ€‚

ใŠใŠใ€ใจใ†ใจใ†ใ“ใ†ใ„ใ†ใƒ„ใƒผใƒซใŒๅ‡บใพใ—ใŸใ‹ใ€‚

ใจใ„ใ†ใ‚ใ‘ใงใฒใจใคใ ใ‘ๆณจๆ–‡ใ‚’ใฐใ€‚DOS/Windows ใงใ‚‚ๅ‹•ใ‹ใ—ใŸใ„ใฎใงใ€‚

 int
 main( int argc, char *argv[])
 {
+        FILE *i = fdopen(fileno(stdin ),"rb");
+        FILE *o = fdopen(fileno(stdout),"ab");
+        if (!i || !o)
+        {
+                fprintf(stderr, "Cannot set stdin/stdout to binary mode.\n");
+                return -1;
+        }
+        ppmtogif(i, o, "none"/*"upperleft"*/);
-        ppmtogif(stdin, stdout, "none"/*"upperleft"*/);
 }

Perl ใ ใฃใŸใ‚‰ไฝ•ใ‚‚่€ƒใˆใšใซ binmode STDIN; binmode STDOUT; ใงใ„ใ„ใ‚“ใงใ™ใ‘ใฉใญโ€ฆ

========================================================================
้ฃฏๅถ‹ ๆตฉๅ…‰ / ใงใ‚‹ใ‚‚ใ‚“ใŸ             http://www.ht.sakura.ne.jp/~delmonta/
IIJIMA Hiromitsu, aka Delmonta           mailto:delmonta@ht.sakura.ne.jp
                                         mailto:delmonta@pop01.odn.ne.jp
Technical Details
Message-ID: <3BCD88E2.173DFE3E@ht.sakura.ne.jp>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!t-newsgw1.odn.ne.jp!nwall.odn.ne.jp!not-for-mail
References: <3bccadb8$0$202$25292c14@hirose.net.tohoku.ac.jp>

Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS
X-Google-Thread: f9e95,9e4fba0723cebfae,start
X-Google-Attributes: gidf9e95,public
X-Google-Thread: fbb7e,9e4fba0723cebfae,start
X-Google-Attributes: gidfbb7e,public
X-Google-ArrivalTime: 2001-10-17 06:35:03 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!news.gtei.net!enews.sgi.com!newshub2.rdc1.sfba.home.com!news.home.com!newsfeed.mesh.ad.jp!t-newsgw1.odn.ne.jp!nwall.odn.ne.jp!not-for-mail
From: IIJIMA Hiromitsu <delmonta@ht.sakura.ne.jp>
Newsgroups: fj.sources.d,fj.comp.image
Subject: Re: ppmtogif-noLZW.c
Date: Wed, 17 Oct 2001 22:34:26 +0900
Organization: ODN dial-up user
Lines: 32
Message-ID: <3BCD88E2.173DFE3E@ht.sakura.ne.jp>
References: <3bccadb8$0$202$25292c14@hirose.net.tohoku.ac.jp>
NNTP-Posting-Host: cbcba-48p242.ppp11.odn.ad.jp
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
X-Trace: nwall2.odn.ne.jp 1003325667 12897 61.201.11.242 (17 Oct 2001 13:34:27 GMT)
X-Complaints-To: news@odn.ad.jp
NNTP-Posting-Date: Wed, 17 Oct 2001 13:34:27 +0000 (UTC)
X-Mailer: Mozilla 4.78 [ja] (Win98; U)
X-Accept-Language: ja,en,zh-TW,zh,zh-CN,de,ko,es