Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:26:24+00:00 2026-06-10T01:26:24+00:00

How to get RGB values using JMagick(a wrapper of imagemagick) ?

  • 0

How to get RGB values using JMagick(a wrapper of imagemagick) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:26:26+00:00Added an answer on June 10, 2026 at 1:26 am

    If you want to get the “red” value of a specific image, on the commandline, you could use the following syntax. For the JMagick API, just look up how you’ll have to translate this into API calls:

     identify  -format "%[fx:s.p{111,111}.r]"  input.jpg
       0.427451
    
    • fx: is ImageMagick’s special effects image operator that allows you to query all sorts of properties from an image, use them in a mathematical expression and apply them on the image;

    • s. tells ImageMagick to select the current image in the sequence for applying the fx operation;

    • p{111,111}. tells fx to use the pixel at column 111, row 111 for this operation (if you skip the pixel coordinates, fx defaults to p{0,0}, which is the pixel in the top left corner;

    • r queries the red channel of the selected pixel;

    • 0.427451 is the result: it means it is 42.7451% of the maximum value of the channel (255 for 8-bit, 65535 for 16-bit).


     identify  -format "%[fx:s.p{111,111}.z]"  input.jpg
       8
    
    • z queries the channel depth used for the pixel. Result is 8.

    You can also query the Hue, Saturation and Lightness values for a pixel after converting the image to the HSL color system:

    identify  -colorspace hsl  -format "%[fx:s.p{111,111}.hue]"  input.jpg 
       0.538012
    
    identify  -colorspace hsl  -format "%[fx:s.p{111,111}.saturation]"  input.jpg 
       0.53271
    
    identify  -colorspace hsl  -format "%[fx:s.p{111,111}.lightness]"  input.jpg 
       0.790196
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can get the r,g,b values using the following functions. int rgb=bImg.getRGB(i, j); int
I want to get RGB values of an image in many lighting conditions. To
I'm trying to get the pixel rgb values from a 64 x 48 bit
Is it possible to get the RGB color of a pixel using PIL? I'm
I am trying to get the RGB background color in IE using the following
I have RGB values that I need to convert into CMYK values. I'm using
I'm trying to get rgb color info from every pixel using imagecolorat() and I'm
I'm trying to convert HSB values to RGB values using this algorithm , but
I'm trying to get an RGB value of a pixel from a CGImageRef object.
Is there any way using AVFoundation and CoreVideo to get color info, aperture and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.