Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3700)

Issue 79045: Corrected the handling of transparent versus opaque images. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 10 months ago by fmil
Modified:
14 years, 7 months ago
CC:
shindig.remailer_gmail.com
Visibility:
Public.

Description

Corrected the handling of transparent versus opaque images. Different image types are selected, depending on whether an image is opaque or has transparency. This fixes transparent image handling (where the transparency was sometimes removed) as well as BGR image handling (these came out with weird colors). Improvements to the image rewriting: o Changed the transparent color writing method o Corrected a bug with isResizeRequired() o Allows accurate handling of images with embedded transparency.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -17 lines) Patch
M java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/BasicImageRewriter.java View 4 chunks +24 lines, -14 lines 2 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/ImageUtils.java View 2 chunks +3 lines, -3 lines 0 comments Download

Messages

Total messages: 3
Paul Lindner
lgtm
14 years, 10 months ago (2009-06-18 21:06:42 UTC) #1
louiscryan
Looks good
14 years, 10 months ago (2009-06-18 21:32:26 UTC) #2
chirag
14 years, 10 months ago (2009-06-18 22:23:06 UTC) #3
http://codereview.appspot.com/79045/diff/1/2
File
java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/BasicImageRewriter.java
(right):

http://codereview.appspot.com/79045/diff/1/2#newcode302
Line 302: g2d.setComposite(AlphaComposite.Clear);
I'm a bit confused about this.

Is there a reason why the composite is being set to AlphaComposite.Clear, even
though it's being set to AlphaComposite.SrcOver a few lines down?

http://codereview.appspot.com/79045/diff/1/2#newcode305
Line 305: g2d.setComposite(AlphaComposite.SrcOver);
I'm curious about this.

I know AlphaComposite.Src will preserve alpha channels by only writing the
source image into the buffer.

What's the benefit of using AlphaComposite.SrcOver instead of
AlphaComposite.Src?
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b