Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
19 June, 2013, 08:09:22 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2]   Go Down
  Print  
Author Topic: Program to display computer screen 3 times before at 33% opacity- help! -  (Read 1120 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #15 on: 28 March, 2012, 03:37:26 »
0

it will be gray, cuz it is showing all 3 pics at 33% opacity.
Logged

ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 07:29:20
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2391


Total Post Ratings: +49

View Profile
« Reply #16 on: 28 March, 2012, 04:15:30 »
0

oh I get it now sorry
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #17 on: 28 March, 2012, 04:17:29 »
0

Ok. Could you make that program? Do you know how?
Logged

ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 07:29:20
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2391


Total Post Ratings: +49

View Profile
« Reply #18 on: 28 March, 2012, 04:18:50 »
0

maybe not completely sure how to do it but I'll look into it

EDIT: How fast would you expect the NXT emulator to run(fps) without the 33% opacity?
« Last Edit: 28 March, 2012, 04:25:07 by ruler501 » Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #19 on: 28 March, 2012, 04:28:34 »
0

Actually, its not an emulator, it just displays the screen of the NXT that is plugged into the computer. It refreshes every 50 ms.
Logged

ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 07:29:20
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2391


Total Post Ratings: +49

View Profile
« Reply #20 on: 28 March, 2012, 04:52:33 »
0

Is it open source? That would make it a lot easier to do otherwise I might be able to do it but I'm not sure how well it would work.

I've only used SDL for video work but it cant capture images from other programs so I have to figure out something else to use. I think I'll use D3D9 because i found a fast way to capture the screen with it. Now if I can convert that to a SDL_Surface with set user boundaries it should work I think
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
cooliojazz
Support Staff
LV7 Elite (Next: 700)
*
Online Online

Gender: Male
Last Login: Today at 07:54:18
Date Registered: 23 May, 2009, 19:28:11
Location: Colorado, USA
Posts: 616


Total Post Ratings: +53

View Profile WWW
« Reply #21 on: 28 March, 2012, 05:22:23 »
0

nxtboy, did you actually try the program i wrote?  it doesn't necessarily show EXACTLY 3 frames at EXACTLY 30% opacity every time, it more layers a crapload of them at closer to 40%, but it has a similar effect to what you want I think... since I don't have that emulator i obviously couldn't test the exact values to make it seem grayest...
Logged

Spoiler for Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."



TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here
The Rest Should Be Here (Bandcamp)
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 07:29:20
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2391


Total Post Ratings: +49

View Profile
« Reply #22 on: 28 March, 2012, 05:26:36 »
0

cooliojazz Could I see the source for your program? I'd just like to look at it to see how you did it. Also I'm trying to learn java so I would like to just read throug some real world programs to see how to make programs
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
cooliojazz
Support Staff
LV7 Elite (Next: 700)
*
Online Online

Gender: Male
Last Login: Today at 07:54:18
Date Registered: 23 May, 2009, 19:28:11
Location: Colorado, USA
Posts: 616


Total Post Ratings: +53

View Profile WWW
« Reply #23 on: 28 March, 2012, 05:34:53 »
0

Sure

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package screenrepeater;

import java.awt.*;
import java.awt.image.*;
import javax.swing.*;

public class ScreenRepeater extends JFrame {
   
    Image background = null;
    boolean bglock = false;

    public static void main(String[] args) {
        ScreenRepeater sr = new ScreenRepeater();
        sr.setSize(200, 200);
        sr.setAlwaysOnTop(true);
        sr.setVisible(true);
        sr.setDefaultCloseOperation(sr.EXIT_ON_CLOSE);
    }
   
    public ScreenRepeater() {
        Thread ssUpdater = new Thread() {
            public void run() {
                AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC, 0.2f);
                while (true) {
                    long time = System.currentTimeMillis();
                    try {
                        background = new Robot().createScreenCapture(new Rectangle(0, 0, getWidth(), getHeight()));
                        temp = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
                        Graphics2D g2 = (Graphics2D)temp.getGraphics();
                        g2.setComposite(ac);
                        g2.drawImage(background, 0, 0, null);
                        setTitle((1d / (double)(System.currentTimeMillis() - time) * 1000) + "");
                        sleep(1);
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                }
            }
        };
        ssUpdater.start();
        Thread repainter = new Thread() {
            public void run() {
                while (true) {
                    try {
                        repaint();
                        sleep(10);
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                }
            }
        };
        repainter.start();
    }

    BufferedImage temp;
   
    @Override
    public void paint(Graphics g) {
        g.drawImage(temp, 4, 25, null);
    }
}
Just probably don't try to learn good habits off of how I write code... =P
« Last Edit: 28 March, 2012, 05:35:23 by cooliojazz » Logged

Spoiler for Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."



TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here
The Rest Should Be Here (Bandcamp)
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Online Online

Gender: Male
Last Login: Today at 07:56:59
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50625


Total Post Ratings: +2636

View Profile WWW
« Reply #24 on: 28 March, 2012, 05:36:12 »
0

By the way Cooliojazz program would be nice if it captured a fixed regiion of the screen and the captured stuff remained in the middle. Basically some sort of window that creates a motion blur effect on the screen area where it is.
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
cooliojazz
Support Staff
LV7 Elite (Next: 700)
*
Online Online

Gender: Male
Last Login: Today at 07:54:18
Date Registered: 23 May, 2009, 19:28:11
Location: Colorado, USA
Posts: 616


Total Post Ratings: +53

View Profile WWW
« Reply #25 on: 28 March, 2012, 05:41:15 »
0

DJ, I was searching for a way to do something like that, but java's screen-capturing utility basically just captures the whole area including windows in your program, so to do something like that, I would have to make the program constantly minimize and un-minimize itself, or constantly toggle between full size and (0,0), or something like that every time i capture the screen, all which take far too long and/or render the program un-interactable (have fun trying to close it now... =P) So i figured just leaving it fixed in the corner would serve the purpose at least...
Logged

Spoiler for Random signess:
You can not beat my skills.
Trust me.
So don't even try.
And remember never to trust someone who says, "Trust me."



TI File Editor Progress: Remade in java like a boss. 50% we'll call it? IDK =P
Java Libraries: JIRC - 90% JTIF - 5%
TI Projects: Unreal Notator - -5000%
Nomcraft, a Bukkit mod
Some of the music I write can be found here
The Rest Should Be Here (Bandcamp)
nxtboy III
LV8 Addict (Next: 1000)
********
Offline Offline

Last Login: 22 May, 2013, 02:53:41
Date Registered: 30 March, 2011, 22:57:58
Posts: 784


Topic starter
Total Post Ratings: +23

View Profile WWW
« Reply #26 on: 29 March, 2012, 00:03:23 »
0

Yeah, I tried your program, but it doesn't work for what I am doing.
So could you do what I said maybe?
Logged

Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.379 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.