Hi All,
I'm not too hot at graphics, so please
excuse me if this is a simple question,
but how would I go about drawing a
picture (which is a color JPG) as
greyscale on a canvas?
Thanks for your help.
All the best,
Mark.
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.3/296 - Release Date: 29/03/2006
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
From Fri 31 Mar 2006 02:38:17 +0200
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
with ESMTP (Eudora Internet Mail Server 3.1.3);
Thu, 30 Mar 2006 18:38:50 -0600
Received: from lists.realsoftware.com (localhost [127.0.0.1])
by lists.realsoftware.com (Postfix) with ESMTP
id 78E3D11ABD5D; Thu, 30 Mar 2006 18:38:36 -0600 (CST)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from smtprelay02.ispgateway.de (smtprelay02.ispgateway.de
[80.67.18.14])
by lists.realsoftware.com (Postfix) with ESMTP id 8266711ABD4F
for <realbasic-nug at lists dot realsoftware dot com>;
Thu, 30 Mar 2006 18:38:29 -0600 (CST)
Received: (qmail 20706 invoked from network); 31 Mar 2006 00:38:23 -0000
Received: from unknown (HELO [192.168.1.80]) (363246 at [84 dot 175 dot 119 dot
41])
(envelope-sender <support at monkeybreadsoftware dot de>)
by smtprelay02.ispgateway.de (qmail-ldap-1.03) with SMTP
for <realbasic-nug at lists dot realsoftware dot com>; 31 Mar 2006
00:38:23 -0000
To: realbasic-nug at lists dot realsoftware dot com (REALbasic NUG)
In-Reply-To: <20060331002358 dot 8436B11ABC54 at lists dot realsoftware dot com>
From: support at monkeybreadsoftware dot de (Christian Schmitz)
Date: Fri, 31 Mar 2006 02:38:17 +0200
Message-ID: <1hd1lqy dot 149ius31mf3otyM%support at monkeybreadsoftware dot de>
Organization: Monkeybread Software Germany
X-Face: nrf3>{WQ6c&r+7 at e)"]0G60`-6ND^)I2mI%>)QGYa=9"=7jhd-g2|b3!>Al0+
Ccb%xGQshhi|g at QU2$
User-Agent: MacSOUP/D-2.7 (Mac OS X version 10.4.5)
Subject: Re: Drawing a greyscale picture?
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com
Mark O'Neill <mark at cutto dot co dot uk> wrote:
> Hi All,
>
> I'm not too hot at graphics, so please
> excuse me if this is a simple question,
> but how would I go about drawing a
> picture (which is a color JPG) as
> greyscale on a canvas?
One way is:
dim p as Picture
p=TintPictureMBS(bild1,&c808080,&c808080)
g.DrawPicture p,0,0
Of course you need to know good values for GrayBase and SepiaBase.
Another way is the PictureSepiaMBS class which has more options:
dim p as Picture
dim t as PictureSepiaMBS
t=new PictureSepiaMBS
t.SourcePicture=bild1
if t.run then
p=t.DestinationPicture
g.DrawPicture p,0,0
end if
(the more options are not used in this example)
Mfg
Christian
--
Around eleven thousand functions in one REALbasic plug-in.
The Monkeybread Software Realbasic Plugin.
<http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|