Omer Boyaci. (C) 2010 Pearson Education, Inc. All rights reserved. Omer Boyaci.

Slides:



Advertisements
Similar presentations
7.1 – The Logarithm Defined as an Integral © 2010 Pearson Education, Inc. All rights reserved.
Advertisements

1 Drawing C Sc 335 Object-Oriented Programming and Design Rick Mercer.
More Java Drawing in 2D Animations with Timer. Drawing Review A simple two-dimensional coordinate system exists for each graphics context or drawing surface.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 20 Recursion.
COSC 4126 images - D Goforth Images, Buffering and Animation controlling full screen graphics.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 4 2D Graphics: Advanced Topics.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 18 Indexing Structures for Files.
Overloading methods review When is the return statement required? What do the following method headers tell us? public static int max (int a, int b)
Lecture07 Graphics Programming in Java. Introduction Most of the graphics programming of java is done with: Most of the graphics programming of java is.
Java How to Program, 9/e © Copyright by Pearson Education, Inc. All Rights Reserved.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Java Programming Practice.
Lecture20 Java Game Programming III – Rate Control, Simple Animation and Display Mode.
J2ME: M3G/11 Intro to J2ME. Prog. v Objectives: –to introduce M3G; –to start talking about "M3G Chapter 2. An Animated Model" u leave the floor,
CSE 219 Computer Science III Images. HW1 Has been posted on Blackboard Making a Game of Life with limited options.
Chapter 15 Graphics and Java 2D™ Java How to Program, 8/e (C) 2010 Pearson Education, Inc. All rights reserved.
(C) 2010 Pearson Education, Inc. All rights reserved. Omer Boyaci.
Omer Boyaci. Resources  
Copyright © 2012 Pearson Education, Inc. All rights reserved Chapter 3 Linear Programming: The Graphical Method.
Image processing with Java - 2D cont’d. Overview  An imaging model that supports the manipulation of fixed- resolution images stored in memory.  A new.
Creating your own image data files. Simple ASCII file output in Java import java.io.FileOutputStream; import java.io.PrintWriter; … PrintWriter out =
Canvas and Graphics CS 21a. 9/26/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved L17: Canvas.
Java™ How to Program, 9/e © Copyright by Pearson Education, Inc. All Rights Reserved.
Chapter 18 產生驗證碼. No Cache 防止在 JSP 或 SERVLET 中的輸出不被 BROWSER 保存在 CACHE 中.
High Performance Java Swing Animation David Wallace Croft Presented to the Plano Java Users Group Plano, TX Copyright 2004 David Wallace Croft.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Functions (Header files and Library Functions) Outline.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 5 - Functions Outline 5.1Introduction 5.2Program.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 5.3Math Library Functions Math library functions –perform.
Zhang & Liang, Computer Graphics Using Java 2D and 3D (c) 2007 Pearson Education, Inc. All rights reserved. 1 Chapter 11 Animation.
JAVA: An Introduction to Problem Solving & Programming, 7 th Ed. By Walter Savitch ISBN © 2015 Pearson Education, Inc., Upper Saddle River,
Java 2D Image Manipulation A Brief Overview Ziv Yaniv.
Using Java without BlueJ BlueJ projects A BlueJ project is stored in a directory on disk. A BlueJ package is stored in several different files.
Section 8.2 The Inverse Trigonometric Functions (Continued) Copyright © 2013 Pearson Education, Inc. All rights reserved.
Chapter 16 Universal Insurance Issues and International Comparisons of Health Care Systems.
Section 1.5 Circles Copyright © 2013 Pearson Education, Inc. All rights reserved.
© 2015 Pearson Education, Inc.
Linear Programming: The Graphical Method
©2004 by Pearson Education. ©2004 by Pearson Education.
Operator Overloading; Class string
© 2015 Pearson Education, Inc.
Learn To Fix Errors On Dell PC. We are a third-party service provider for Dell users in Nederland. Call us on Website:
©2004 by Pearson Education. ©2004 by Pearson Education.
Welcome App Android How to Program
Address Book App Android How to Program
Android Market and App Business Issues
Exception Handling: A Deeper Look
Section 2.5 Graphing Techniques; Transformations
Tip Calculator App Android How to Program
Doodlz App Android How to Program
Copyright © 2013 Pearson Education, Inc. All rights reserved
Route Tracker App Android How to Program
Section 9.4 Area of a Triangle
Section 2.5 Graphing Techniques; Transformations
The Inverse Trigonometric Functions (Continued)
I UNDERSTAND CONCEPTS OF MULTIMEDIA
Definition Copyright © 2013 Pearson Education, Inc.. All rights reserved.
Section 10.1 Polar Coordinates
Polynomial and Rational Inequalities
Extra Nomenclature Practice Answers
Enhanced Slideshow App
Chemistry Ch. 10 Review and worksheets
Section R.2 Algebra Essentials
Section 10.5 The Dot Product
Unit 4 Review Answers.
Forms.
Section 12.3 Geometric Sequences; Geometric Series
Online Pogo Game Customer Service
Pogo Game Customer Care Helpline Number

Call Pogo Contact Phone Number and Enjoy Pogo Game
Presentation transcript:

Omer Boyaci

(C) 2010 Pearson Education, Inc. All rights reserved. Omer Boyaci

private BufferedImage im; im = ImageIO.read( getClass().getResource("ball.gif")); Image Loading (C) 2010 Pearson Education, Inc. All rights reserved.

public BufferedImage loadImage(String fnm){ /* Load the image from, returning it as a BufferedImage which is compatible with the graphics device being used. Uses ImageIO. */ try { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment( ); GraphicsConfiguration gc = ge.getDefaultScreenDevice( ).getDefaultConfiguration( ); BufferedImage im = ImageIO.read(getClass( ).getResource(fnm)); int transparency = im.getColorModel( ).getTransparency( ); BufferedImage copy = gc.createCompatibleImage( im.getWidth( ),im.getHeight( ),transparency ); // create a graphics context Graphics2D g2d = copy.createGraphics(); // copy image g2d.drawImage(im,0,0,null); g2d.dispose( ); return copy; } catch(IOException e) { System.out.println("Load Image error for " + fnm + ":\n" + e); return null; } } // end of loadImage( ) (C) 2010 Pearson Education, Inc. All rights reserved.

Image Names (C) 2010 Pearson Education, Inc. All rights reserved.

 You can load individual images image strips multiple image files that represent an animation sequence. Animation (C) 2010 Pearson Education, Inc. All rights reserved.

Animation Types (C) 2010 Pearson Education, Inc. All rights reserved.

// imsInfo.txt images o atomic.gif o balls.jpg o bee.gif o cheese.gif o eyeChart.gif o house.gif o pumpkin.png o scooter.gif o ufo.gif o owl.png n numbers*.gif 6 n figure*.gif 9 g fighter left.gif right.gif still.gif up.gif s cars.gif 8 s cats.gif 6 s kaboom.gif 6 o basn6a08.png o basn6a16.png (C) 2010 Pearson Education, Inc. All rights reserved. o n s g [ ]*

Strip file (C) 2010 Pearson Education, Inc. All rights reserved.

Swing Timer (C) 2010 Pearson Education, Inc. All rights reserved.

ImagePlayer (C) 2010 Pearson Education, Inc. All rights reserved.

Java Games

Runescape 

Stellar Dawn 

Wakfu 

Tribal Trouble 2 

Pirate Galaxy 

Resistance Force 

Urban Galaxy 

Poisenville 

Chrome  dukt=179

Wurm 

Cell Invaders - TowerDefense  e/virchow/index.html

Wezzle 

CEPHEI - HOSTILE PLANET 