Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transparent Background

 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am putting a JPG image file on my web-site and have things behind it that I want to be visible. What is the easiest way to add transparency to a .JPG file's back ground color?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There isn't. JPGs cannot have transparent backgrounds. I suggest using a PNG.
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once converted to a .PNG what would I do?
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can look at it if you want to...

It is http://www.joerdesigner.net

It is a simple text image that can be redesigned... the image simply needs to have a transparent background. I do not necessarily need to add a transperant bg to an existing file as it can be created from scratch... I simply need a decorative font (cursive like) and a transparent bg.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Photoshop, or similar tool, mask out the parts you want to make transparent and remove them. Save as a PNG with transparency enabled.

You could also use a GIF, but PNG is a more modern format that also supports partial transparency via an actual alpha channel. GIFs just fake it.
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:In Photoshop
You could also use a GIF, but PNG is a more modern format that also supports partial transparency via an actual alpha channel. GIFs just fake it.



Cool thank you thats what I was looking for...
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your site just displays a black page.

In any case, creating a new image is even easier. In Photoshop (or Pixelmator, Gimp, etc) create a new image of the correct size with a transparent background. Add the text or whatever else you want. Save as a PNG.
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:

Your site just displays a black page.

quote]

Hmmmm.. shoot

I had the same problem on someone elses PC. It displays fine on some but not on others. It is a JApplet.


Thanks for the referal though...

So you can set the Opaque and Transparncy (alpha) compnent on these?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh. Applets are not a modern technology you should be using. In fact, because of a recently-found exploit, applets are automatically disabled on a number of different browsers. I'd advise learning how to use HTML/JavaScript/CSS for web sites in place of antiquated Java applets.
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah. I am not too terrile with the three JS,HTMLS & CSS but I can do more with an Applet, such as animation and greater freedom. But the down side is sometimes it is automatically disabled. Is there a way to check ahead of time and perhaps add a JS function using the document.write to display either the HTML version of a page or the JApplet version before the page loads?

To see if the browser will accuratly display the page??
Or is their any way around it other then simply not using the page I put a ton of hard work into?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure about detection as applets are something I'd never use. I'd suggest asking in the Applets forum.

And yeah, there are others who have sunk a lot of work into applets, but the sad fact is that they are the 8-track cassette of the web. Shifting away from them now would be better late than never.
 
Joe Ridener
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of the software available that can do this which would you recomend...

I am good w/ ColorPic, hexadeciaml digits and rgb for things like GradientPaint objects and familiar with Rastars and ColorModel Objects as well. And familiar w. the Alpha component as far transparency vs. Opaque goes. Kind a want to avoid a big new learning experience although creating image files is inevitable part of the path. Still just want something quick and usefull like ColorPic for something like this with maybe some other cool features I might like that are easy too.

Any recemodations?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64623
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use one of Photoshop or Pixelmator.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic