Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #15482
| Path | csiph.com!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Knute Johnson <nospam@knutejohnson.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. |
| Date | Wed, 20 Jun 2012 21:23:35 -0700 |
| Organization | A noiseless patient Spider |
| Lines | 40 |
| Message-ID | <jru7k7$17p$1@dont-email.me> (permalink) |
| References | <jrrcl4$f5v$3@dont-email.me> <jrsqrq$td1$1@dont-email.me> <jrtpi8$i87$11@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Thu, 21 Jun 2012 04:23:35 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="mz/LDSJwiWnk3Jnnqg7x+Q"; logging-data="1273"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18voadKlB9SigdU7CQCE5bR" |
| User-Agent | Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 |
| In-Reply-To | <jrtpi8$i87$11@dont-email.me> |
| Cancel-Lock | sha1:iRyUwZdg5oz0rGVUF+ft1eHC0Dw= |
| Xref | csiph.com comp.lang.java.programmer:15482 |
Show key headers only | View raw
On 6/20/2012 5:23 PM, Fred Greer wrote:
> On Wed, 20 Jun 2012 08:39:37 -0700, Knute Johnson wrote:
>
>> On 6/19/2012 7:31 PM, Fred Greer wrote:
>>> I have code that used to work perfectly, which processes images in
>>> certain ways, and today it suddenly was not working. I hadn't changed
>>> the code at all. I tracked the problem down to spurious
>>> IllegalArgumentExceptions being thrown by this code:
>>>
>>> public class ImageUtils {
>>>
>>> private static float[] BLUR = {0.1111111, 0.1111111, 0.1111111,
>>> 0.1111111, 0.1111111, 0.1111111,
>>> 0.1111111, 0.1111111, 0.1111111}
>>> ...
>>> public static BufferedImage blur (BufferedImage img) {
>>> Kernel k = new Kernel(3, 3, BLUR);
>>> ConvolveOp co = new ConvolveOp(k, ConvolveOp.EDGE_NO_OP,
>>> null); BufferedImage dest = new BufferedImage(img.getWidth(),
>>> img.getHeight(),img.getType());
>>
>> Please try just putting BufferedImage.TYPE_INT_ARGB here instead of
>> getting the type from the other image and tell us what happens.
>
> Are 32-bit PNGs loaded via ImageIO.read guaranteed to be ARGB, or at
> least compatible with ARGB destination images for the purposes of
> ConvolveOp and friends?
>
I am certainly no expert but I would think that a PNG file would create
an ARGB image without any problems and I was curious what would happen.
The other option is to not even create a new image and just convert the
one you have by putting null destination field.
--
Knute Johnson
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
ImageIO/BufferedImage behaving inconsistently from one day to the next. Fred Greer <fggreer@nospam.invalid> - 2012-06-20 02:31 +0000
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. markspace <-@.> - 2012-06-19 19:38 -0700
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Fred Greer <fggreer@nospam.invalid> - 2012-06-20 03:07 +0000
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. markspace <-@.> - 2012-06-19 20:22 -0700
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. "John B. Matthews" <nospam@nospam.invalid> - 2012-06-20 14:26 -0400
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Patricia Shanahan <pats@acm.org> - 2012-06-19 20:38 -0700
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Fred Greer <fggreer@nospam.invalid> - 2012-06-20 04:08 +0000
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Roedy Green <see_website@mindprod.com.invalid> - 2012-06-20 01:16 -0700
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Joerg Meier <joergmmeier@arcor.de> - 2012-06-20 11:44 +0200
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Fred Greer <fggreer@nospam.invalid> - 2012-06-21 00:22 +0000
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Knute Johnson <nospam@knutejohnson.com> - 2012-06-20 08:39 -0700
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Fred Greer <fggreer@nospam.invalid> - 2012-06-21 00:23 +0000
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Knute Johnson <nospam@knutejohnson.com> - 2012-06-20 21:23 -0700
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Fred Greer <fggreer@nospam.invalid> - 2012-06-21 04:58 +0000
Re: ImageIO/BufferedImage behaving inconsistently from one day to the next. Knute Johnson <nospam@knutejohnson.com> - 2012-06-21 05:58 -0700
csiph-web