• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Resizing images with higher DPI makes them dark

 
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use following code to resize the uploaded images in our application. The resizing works fine, but I am getting darker images when I try to resize images with higher DPI.



These are my finidings -
(1) When I upload a larger photo which is 72 dpi, the resizer works fine. for example, 1280px wide 72 dpi, will resize to 800 wid 72 dpi and the photo looks fine.

(2) But if the original photo is 300dpi the resizer will convert it to 800 wide 72dpi but the resized photo is VERY dark.

I am wondering what could be causing this and how can I fix this. Any help, pointers wil be highly appreciated!

TIA,
- Manish
[ March 20, 2007: Message edited by: Manish Hatwalne ]
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interestingly, when I resize photo on my local machine (Windows XP) - there is no darkening. But when we test this on our server - it is turing very dark (Linux box) - so I am wondering if there is any property/configuration that I can tweak to get this working?

- Manish
 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No inputs??? Can anyone tell me what can I do to at least make sure that contrast/brightness is high for resized images??? The image is really very dark!!
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure why that wouldn't work on a linux box, I have used the following on linux and windows and it works fine on both of them.

 
Without subsidies, chem-ag food costs four times more than organic. Or this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic