Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

transparent (quick)

Posted on 2004-08-25
13
242 Views
Last Modified: 2010-03-31
What is the most all around simple but efficient way of taking a gif picture,  lets say... a ball and putting that picture on a background seeing just the ball on the background... not the square of the other solid color that is around the ball... I need to make the color transparent.

I am making a pong game and I want a cool looking ball but i dont want that dang square around it...

Either an explanation, or a link to an easy to follow comprehensive tutorial would be very helpful...

Thank you for your time,

Facade
0
Comment
Question by:facade
  • 6
  • 4
  • 3
13 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 11898127
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11898128
0
 
LVL 92

Expert Comment

by:objects
ID: 11898137
Easiest is to simply create your gif with a transparent background in the first place.
0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:facade
ID: 11898673
objects: How would i just create the transparent gif backgroun in the first place? would i need a special program? Right now im just using paint to make my gifs.

CEHJ: im sorry but im mostly a beginner to this language. i don't quite understand how i would apply either of those methods. Which one should i use? in the second one do i need all that code just to do what i want to do?

plus i dont get how anywhere in either code i specify that i just want the background AROUND the ball, (the black square that borders the ball) to be transparent. Im sorry but can you please help simplify a little?

Thanks,

-Facade
0
 
LVL 92

Expert Comment

by:objects
ID: 11898682
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11898705
An easier option for you then - why don't you draw the ball

graphics.drawOval(0, 0, 15, 15);
0
 
LVL 92

Expert Comment

by:objects
ID: 11898729
> An easier option for you then

No easier than drawing an image
0
 
LVL 92

Expert Comment

by:objects
ID: 11898734
in fact its really more complicated
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 11898741
I'm sorry but it is if the image doesn't happen to be transparent in the right places
0
 

Author Comment

by:facade
ID: 11898914
objects: hmm, so i cant do it right off my c: drive? or can i? when it says "you should configure your web browser to load the next retrieved URL to local disk." what does it mean? how do i do this in ie? If i do just specify the path to c://ball.gif then the page comes up with the picture, but then when i click on it it says:

"TransWeb was unable to retrieve the image you specified because the URL you specified was not valid. Note that TransWeb only supports HTTP URLs; support for FTP URLs has not been implemented yet. Check to make sure you entered the URL correctly and try again."

What should i do?

-Facade
0
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 11898950
if its on your disk then grab one of these tools to do the transparency locally:

http://www.htmlgoodies.com/tutors/transpar.html
0
 

Author Comment

by:facade
ID: 11899113
Thank you guys very much for your help. And that method of just making the image transparent in photoshop really works perfectly objects :)

Thanks again for your time

-Facade
0
 
LVL 92

Expert Comment

by:objects
ID: 11899128
Glad I could help :)
Let me know if you have further questions in the future.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android development question 2 53
Problem to Alipay 10 43
learn programming 8 34
passing enum to a method 3 18
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question