Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Maximizing image size without perceived pixelation

  1. #1

    Default Maximizing image size without perceived pixelation

    Is there a way to maximize the size of a JPEG image for display without pixelation?
    As I see it, the beginning of pixelation is when one image pixel maps to more than one rod in your eyeball.
    I have been limiting the image size by using the screen resolution so that JPEG pixels do not map to more than one screen pixel. However, this does not take into account (1) the screen (or window) size in inches and (2) viewer distance from the screen. The latter could be entered by the user with a common default, but is there a way to access the former? (Preferably in Java, Perl, or C/C++) With this information one could map the image pixels to eyeball rods and limit the image size so it produces no more than one rod/pixel. Actual visual perception is probably more complex than this, so a corrective factor may be desired.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Maximizing image size without perceived pixelation

    In general it's not possible to determine the DPI of a screen because some screens don't have a fixed size, for example projectors. You could try ask the user to input in a display size manually.

    Additionally, for a normal viewing distance many displays don't have enough pixel density to be indistinguishable to viewers. An average display may have something like 72-150 DPI, but if viewed from under 2 ft this may not enough for the average viewer to not recognize pixels. Drawing less than 1 image pixel per 1 screen pixel is likely just a waste as you can't resolve details that fine anyways, and the drawing engine will have to do some kind of averaging of image pixels.

  3. #3

    Default Re: Maximizing image size without perceived pixelation

    Quote Originally Posted by helloworld922 View Post
    In general it's not possible to determine the DPI of a screen because some screens don't have a fixed size, for example projectors. You could try ask the user to input in a display size manually.

    Additionally, for a normal viewing distance many displays don't have enough pixel density to be indistinguishable to viewers. An average display may have something like 72-150 DPI, but if viewed from under 2 ft this may not enough for the average viewer to not recognize pixels. Drawing less than 1 image pixel per 1 screen pixel is likely just a waste as you can't resolve details that fine anyways, and the drawing engine will have to do some kind of averaging of image pixels.
    Thank you. The scenario I have in mind is a large high-resolution monitor used for a TV and computer screen. Say it can be viewed from 2' to 12'. Pixelation at 2' might disappear at 12'. Currently my OS learns some things about my plug and play monitor when it is installed, such as what driver it needs. Perhaps it also knows (or will some day know) the size of the monitor, and Java code can tell us programmers what it is. In some cases, as you say, the size is variable and would have to be entered. In any case a configurable presentation with maximum/non-pixelation viewing of images for a specified distance from the screen would be beneficial. Until then, I guess I will continue to limit the maximize size of the images to 1 screen pixel/image pixel. Eventually, I would hope to have the information to configure better.

Similar Threads

  1. Replies: 6
    Last Post: December 17th, 2012, 06:54 AM
  2. Jpanel preffered size exceed the nactual screen size
    By manish.ctae@gmail.com in forum AWT / Java Swing
    Replies: 2
    Last Post: October 31st, 2012, 01:29 AM
  3. Replies: 1
    Last Post: April 30th, 2012, 08:16 AM
  4. [SOLVED] can't get Image size.
    By samanesh in forum What's Wrong With My Code?
    Replies: 12
    Last Post: March 8th, 2011, 11:05 AM
  5. [SOLVED] Change the size of an image
    By subhvi in forum Algorithms & Recursion
    Replies: 4
    Last Post: August 23rd, 2009, 11:44 PM

Tags for this Thread