1. [OT] Swap RGB

Does anyone know a program that can exchange a RGB palette for, say, a BRG one?
That is, everything that shows as red should be viewed a blue, and the other way
around?
What I mean is that this change should be permanent, for any image on screen.
Is there a way to achieve this in EUPHORIA?
Thanks.

new topic     » topic index » view message » categorize

2. Re: [OT] Swap RGB

Ricardo Forno wrote:

> Does anyone know a program that can exchange a RGB palette for, say, a BRG
> one?
> That is, everything that shows as red should be viewed a blue, and the other
> way around?
> What I mean is that this change should be permanent, for any image on screen.
> Is there a way to achieve this in EUPHORIA?
> Thanks.

Hi Ricardo

Maybe the win32dib library can help there?  It can load images and you can
easily access the dib image memory to make manipulations, then save the image.

A program which can do it is IrfanView (http://www.irfanview.de/).

Gary

new topic     » goto parent     » topic index » view message » categorize

3. Re: [OT] Swap RGB

Gary Shingles wrote:
> 
> Ricardo Forno wrote:
> 
> > Does anyone know a program that can exchange a RGB palette for, say, a BRG
> > one?
> > That is, everything that shows as red should be viewed a blue, and the other
> > way around?
> > What I mean is that this change should be permanent, for any image on
> > screen.
> > Is there a way to achieve this in EUPHORIA?
> > Thanks.
> 
> Hi Ricardo
> 
> Maybe the win32dib library can help there?  It can load images and you can
> easily
> access the dib image memory to make manipulations, then save the image.
> 
> A program which can do it is IrfanView (<a
> href="http://www.irfanview.de/">http://www.irfanview.de/</a>).
> 
> Gary

Thanks, Gary, but this is not what I want. I'd like, for example, to see every
page of the Web in different colors, while I sail. That's why I'd want to
permanently change the palette (Ok, until I want a different one..).
Regards.

new topic     » goto parent     » topic index » view message » categorize

4. Re: [OT] Swap RGB

Ricardo Forno wrote:
> 
> Gary Shingles wrote:
> > 
> > Ricardo Forno wrote:
> > 
> > > Does anyone know a program that can exchange a RGB palette for, say, a BRG
> > > one?
> > > That is, everything that shows as red should be viewed a blue, and the
> > > other
> > > way around?
> > > What I mean is that this change should be permanent, for any image on
> > > screen.
> > > Is there a way to achieve this in EUPHORIA?
> > > Thanks.
> > 
> > Hi Ricardo
> > 
> > Maybe the win32dib library can help there?  It can load images and you can
> > easily
> > access the dib image memory to make manipulations, then save the image.
> > 
> > A program which can do it is IrfanView (<a
> > href="http://www.irfanview.de/">http://www.irfanview.de/</a>).
> > 
> > Gary
> 
> Thanks, Gary, but this is not what I want. I'd like, for example, to see every
> page of the Web in different colors, while I sail. That's why I'd want to
> permanently
> change the palette (Ok, until I want a different one..).
> Regards.

Do you mean http://www.google.co.uk/search?q=SetSysColors ?

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

5. Re: [OT] Swap RGB

Hi Pete.
I went to the description and, unless I don't understand exactly what it does,
this is not the thing I want.
According to what I understood, the SetSysColors routine is applied only to a
single window.
If you are browsing the Net, this windows gets changed rapidly, and consequently
the routine's effect dissapears.
Moreover, I'd like to execute a program *before* connecting to Internet, such
that its effects last
until the program is executed once more.
Maybe I am in error, but I don't think SetSysColors can do that.
Do you remember a joke program that in old times changed the screen upside down,
or the phrases backward, until some action was taken? Well, what I want is
something similar, but in relation to colors.
But it seems no one knows about it, and probably it was never written.
Thanks again, and best regards.

new topic     » goto parent     » topic index » view message » categorize

6. Re: [OT] Swap RGB

Ricardo Forno wrote:
> 
> 
> Hi Pete.
> I went to the description and, unless I don't understand exactly what it does,
> this is not the thing I want.
> According to what I understood, the SetSysColors routine is applied only to
> a single window.
No, it is system side, but see below.
> If you are browsing the Net, this windows gets changed rapidly, and
> consequently
> the routine's effect dissapears.
> Moreover, I'd like to execute a program *before* connecting to Internet, such
> that its effects last
> until the program is executed once more.
> Maybe I am in error, but I don't think SetSysColors can do that.
> Do you remember a joke program that in old times changed the screen upside
> down,
> or the phrases backward, until some action was taken? Well, what I want is
> something similar, but in relation to colors.
> But it seems no one knows about it, and probably it was never written.
> Thanks again, and best regards.

Don't get your hopes up too high, but I translated an m$ example to Eu. It does
a good job on Explorer, the trouble is that most programs such as Opera (and
Edita) do not display things using system colours very often, so the effect is
much more limited. Anyway, worth a spin just for a laugh:

include dll.e
include machine.e
include get.e
constant user32=open_dll("user32.dll"),
	 xGetSysColor=define_c_func(user32,"GetSysColor",{C_INT},C_INT),
xSetSysColor=define_c_func(user32,"SetSysColors",{C_INT,C_POINTER,C_POINTER},C_INT),
	 pDspElements=allocate(4*19),
	 pRGBValues=allocate(4*19)

sequence Csave
object void

    Csave=repeat(0,19)
    for i=0 to 18 do
	Csave[i+1]=c_func(xGetSysColor,{i})
    end for
    for i=0 to 18 do
	poke4(pDspElements+i*4,i)
	poke4(pRGBValues+i*4,rand(#FFFFFF))
    end for
    void = c_func(xSetSysColor,{19,pDspElements,pRGBValues})
    puts(1,"press any key to reset")
    if wait_key() then end if
    poke4(pRGBValues,Csave)
    void = c_func(xSetSysColor,{19,pDspElements,pRGBValues})


Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

7. Re: [OT] Swap RGB

Pete Lomax wrote:
> No, it is system side, but see below.
I meant to say system wide, but that'll do smile.

new topic     » goto parent     » topic index » view message » categorize

8. Re: [OT] Swap RGB

Pete Lomax wrote:
> 
> Pete Lomax wrote:
> > No, it is system side, but see below.
> I meant to say system wide, but that'll do smile.

Thanks, Pete, it worked fine.
However, this was only part of what I wanted to do.
Colors whitin the window are not modified.
Do you think it is possible to do that, for any page,
so that what is usually seen as red shows as yellow, etc.?

By the way, I don't really know how to deal with DLLs.
Where can I find an explanation? I know how to program in C,
but only at the applicaton level.
Moreover, where can I get a description of the other routines in user32.dll?
One thing that recently I wondered how is it done is how some programs
intercept the Ctrl-C call to the clipboard, and then manage to store
the clipboard contents in a file. Can this be done with some system dll?
Many thanks for your help.

new topic     » goto parent     » topic index » view message » categorize

9. Re: [OT] Swap RGB

Ricardo Forno wrote:
> 
> Pete Lomax wrote:
> > 
> > Pete Lomax wrote:
> > > No, it is system side, but see below.
> > I meant to say system wide, but that'll do smile.
> 
> Thanks, Pete, it worked fine.
> However, this was only part of what I wanted to do.
> Colors whitin the window are not modified.
> Do you think it is possible to do that, for any page,
> so that what is usually seen as red shows as yellow, etc.?
Probably not. I do wonder if it is possible to hide an app and monitor, I dunno,
WM_ENTERIDLE perhaps, then read a bitmap of the entire window, and display that
in your own window, obviously forwarding all mouse/keyboard messages to the real
app. Many moons ago I wrote a minesweeper beater which did the basics, examining
bitmap bits and sending mouse messages, but the image had to be on screen, not
hidden away somewhere.

One thing I can do in Opera is apply my own css files which allows for some
pretty funky stuff, compare:
http://palacebuilders.pwp.blueyonder.co.uk/pss.gif
http://palacebuilders.pwp.blueyonder.co.uk/mss.gif

BTW, which one of the above does my page look like to you?
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

> By the way, I don't really know how to deal with DLLs.
Do you mean calling them, or creating them? I know very little about the latter.

> Where can I find an explanation? I know how to program in C,
> but only at the applicaton level.
> Moreover, where can I get a description of the other routines in user32.dll?
While it is getting on a bit, I still use the .hlp file:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?win=on&keywords=API+Documentation

(plus of course google anything missing).

> One thing that recently I wondered how is it done is how some programs
> intercept the Ctrl-C call to the clipboard, and then manage to store
> the clipboard contents in a file. Can this be done with some system dll?
JL says he can do, I wouldn't mind seeing this as well.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

10. Re: [OT] Swap RGB

Hi, Pete. I'm not very profficient at colloquial Englis. That's why I don't
understand this:

http://palacebuilders.pwp.blueyonder.co.uk/pss.gif
http://palacebuilders.pwp.blueyonder.co.uk/mss.gif

BTW, which one of the above does my page look like to you?
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html

Also, who is JL?
JL says he can do, I wouldn't mind seeing this as well.

Regards.

new topic     » goto parent     » topic index » view message » categorize

11. Re: [OT] Swap RGB

Ricardo Forno wrote:
> 
> 
> Hi, Pete. I'm not very profficient at colloquial Englis. That's why I don't
> understand this:
> 
> <a
> href="http://palacebuilders.pwp.blueyonder.co.uk/pss.gif">http://palacebuilders.pwp.blueyonder.co.uk/pss.gif</a>
> <a
> href="http://palacebuilders.pwp.blueyonder.co.uk/mss.gif">http://palacebuilders.pwp.blueyonder.co.uk/mss.gif</a>
> 
Clicking on those should get you two images, one using "Page Style Sheet" and
one using "My Style Sheet" setting in Opera. If you toggle between the two (Alt
left/right in IE, or 1/2 in Opera) you should see the actual page (lower left)
look very different under the changed settings, the point being that nothing
whatsoever has been changed on the remote server.

Note that A) this is limited to the web browser, and B) I have no idea whether
other web browsers such as IE support anything similar, and C) writing a
one-size-fits-all .css might be fiddly, but there ought to be a few readily
available on the web. Also, I am typing this on an all plain grey screen instead
of the white/cream surround I had before (obviously without changing anything at
openeuphoria.org).

I am assuming that it is mostly the web browser you want to change, right?

> Also, who is JL?
Juergen Luethje. The code has been posted (Thanks Juergen)

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

12. Re: [OT] Swap RGB

Hi Pete.
You wrote:

I am assuming that it is mostly the web browser you want to change, right?

This may be an option.
But what I was thinking originally was that the video signals going to
the screen could be changed on their way, for example manipulating the
bits representing the color code. This could be done under old DOS by
intercepting some interrupts, but it seems that this is no more possible
under Windows.
Thanks again. I think this subject is now closed.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu