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

  • Home
  • SEARCH
  • 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 7776085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:47:19+00:00 2026-06-01T17:47:19+00:00

I have to create a BufferedImage from a list of float array. With one

  • 0

I have to create a BufferedImage from a list of float array. With one float array i create one pixel width of the image. The total width is 500 px. The float array list’s size can be up to 10000 float array.

The image I built is some sort of history, so it is display in a time length graph. For example if the history is 6min the graph goes from 3 to -3 on the x axes, and the image should be centered against a middle point between 3 and -3.
The title says “interpolate”, but I’m not sure if the solution involves interpolation.

  1. How can I choose float array from the list if the list size is over 500?
  2. How can I split the list if its size is less than 500?
  • 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-01T17:47:21+00:00Added an answer on June 1, 2026 at 5:47 pm

    1 & 2) You have to calculate 500 pixels / size. That’s how many pixels you use for each value. If you have more than 500 float values, each value will take less than a pixel width. If you have less than 500 values, each value will take more than a pixel width.

    Let’s say you have 700 float values. Each value will take 5/7 of a pixel. You can’t plot partial pixels, but you can sum and round to determine which value to plot.

    • Value 1 – 5/7 – round to 1 – plot on the first pixel
    • Value 2 – 10/7 – round to 1 – plot on the first pixel (overlay value 1)
    • Value 3 – 15/7 – round to 2 – plot on the second pixel
    • Value 4 – 20/7 – round to 3 – plot on the third pixel

    and so on, until you’ve plotted all the values.

    Let’s say you have 300 float values. Each value will take 5/3 of a pixel, or almost 2 pixels. Again, you sum and round to determine which values to plot.

    • Value 1 – 5/3 – round to 2 – plot on the first and second pixels
    • Value 2 – 10/3 – round to 3 – plot on the third pixel
    • Value 3 – 15/3 – round to 5 – plot on the fourth and fifth pixels
    • Value 4 – 20/3 – round to 7 – plot on the sixth and seventh pixels

    and so on, until you’ve plotted all the values.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a collection of BufferedImage instances, one main image and some subimages created
I have the method below: private Graphics getBufferedImage(Image image) { // Create empty BufferedImage,
I want to create a BufferedImage from a image but it not run. what
I have create a custom contextMenu using AS3 and can apply that to the
I have create a listview of Contact numbers , the list item contains the
I have create an array containing person firstname,lastname and number which i populate in
I need to create a grayscale image from data in an nio ShortBuffer. I
I want to use this Swing snippet to create an image from a text
I have managed to load in an image using: BufferedImage image = ImageIO.read(out); and
I have two BufferedImages I loaded in from pngs. The first contains an image,

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.