• Post Reply Bookmark Topic Watch Topic
  • New Topic

BufferedImage to MagickImage  RSS feed

 
P Money
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all. Not sure if this is an appropriate topic seeing as how I didn't find a single topic in this forum with MagickImage as the search term, but I suppose if nobody answers and/or my wrist is slapped, I'll know. Also, I've done a preliminary search on the internets and MagickImage's Javadoc and nothing of substance was found.

I am attempting to use ImageMagick to modify image files (.tiff) and I seem to be running into a bit of a problem with converting a modified image using JMagick to BufferedImage. Has anybody here ever done this? Also, and maybe a better question to have asked first: Is there any real benefit to using JMagick over BufferedImage?

Any assistance on this would be greatly appreciated. Additionally, I'm not looking for handouts here, just a "bump" in the right direction.

Thanks.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ImageMagick is well-known; MagickImage not at all so. I guess you're referring to JMagick? http://www.jmagick.org/jmagick-doc/

I'm confused by "converting a modified image using JMagick to BufferedImage" and "using JMagick over BufferedImage". While I have no idea what JMagick might be used for, a TIFF image can be opened (into a BufferedImage) and saved using the javax.imageio.ImageIO class; no other library is needed at all.

If JMagick is a Java wrapper for ImageMagick, and it's causing you problems, my first advice would be to do without it - use ImageMagick directly, and then open the image using Java's built-in classes.
 
P Money
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yea, now that I reread my post, it is a bit confusing... I am referring to JMagick and I'm also referring to MagickImage, a class in JMagick.

So, like I said, I'm trying to edit some images (denoising, deskewing, etc.) and do so through JMagick instead of ImageIO. My problem with
using ImageMagick is that I want to do as little as possible through the command line in my project.

So, I'm not necessarily having any trouble with JMagick, I'm just at a loss for syntax to create a class.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks to me like you need to transfer pixels between the buffered image and magic image api as byte[]s. There doesn't seem to be a direct translation and it looks like the magic image is used for processing not display so it isn't an either one or the other thing. ..

Unless there is more to the api which I didn't look at. To say that project is under documented is an understatement. It's home page is simply a directory listing for the downloads. ..
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any particular reason you want to use MagickJ? There are very capable Java image libraries that are a lot better documented, and have lively mailing lists, like ImageJ (which I can heartily recommend).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!