🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #617

Color to Black&white

#617
From: Vincent
Date: Mon, 26 May 2003 08:30
23 lines
1774 bytes
Hi,

  I'd like to transform a colored picture (from a gif or jpeg file for
exemple) in a Black and White image (wbmp format). I use a
ColorConvertOp to do that, but I don't know how to param it to have a nice
conversion, not a pixel level conversion. Here is the code I used:

BufferedImage bi4 = new BufferedImage(bi3.getWidth(), bi3.getHeight(),

BufferedImage.TYPE_BYTE_BINARY);
ColorConvertOp cco2 = new
ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY), null);
cco2.filter(bi3, bi4);

Where bi3 is my original BufferedImage.

Do you know where I can find more information on this conversion, because in
the help I don't understand everything (I have no knowledge on picture
conversion).

Thanks for all

Vincent
Technical Details
Message-ID: <3ed1d08c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,24389c25229acd42,start
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f74b3,24389c25229acd42,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2003-05-26 01:40:18 PST
From: "Vincent" <vincent@classfoot.com>
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language
Subject: Color to Black&white
Date: Mon, 26 May 2003 10:30:43 +0200
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 212.83.129.32
Message-ID: <3ed1d08c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1053937804 212.83.129.32 (26 May 2003 01:30:04 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail