bricelam / ImageResizer

Moved to Microsoft PowerToys
https://github.com/microsoft/PowerToys
1.03k stars 118 forks source link

Sugestion: add DPI function #82

Closed joaowendel closed 6 years ago

joaowendel commented 6 years ago

Hi! I'm a fan of this little program. I have a little sugestion that I guess is not difficult to implement: an option to change DPI of output image. I've trying to find over the web some simple program to do this, but it doesn't exist! All foruns and web pages recommend the same: use Photoshop or an online converter... It will be great if you can do this little improvement. Thank you!!!

JNavas2 commented 6 years ago

Digital images do not have DPI. That's a common misconception. DPI is only relevant for display or printing, and depends on the size of the displayed or printed image. If your image is 800 x 1200, and you print it 4" by 6", that's 200 DPI. If you print it 8" x12", that's 100 DPI. Same image, different DPI depending on printed size. See The Myth of DPI.

joaowendel commented 6 years ago

Sorry, but I desagree. Actually, every image file has an atributte that determine the DPI value to this file. I understand your explanation about what is DPI, but it's very important when we print some imagens to a PDF file, for example. If the image has 72 DPI, the result will be a big image @ 100% zoom. On the other hand, if I print a 300 DPI attribute image, the results will be OK, with a better presentation of the document. Photos from cellphones usually has DPI set to 72. This is a huge problem when you take pictures of some documents and want to create PDF files with them.

steveroot commented 6 years ago

How are you converting your image to a PDF? If you're using something like a word processor (Word, Libreoffice Docs) when you place the image you can change the size on the page. This scales the image and doesn't change it's width/height in pixels so you don't lose any quality (or gain any). When you export your document to PDF it often (depending on your chosen settings) will recreate the embedded image(s) at a lower resolution to reducing the total file size. If you're using windows built in photo viewer/editor and printing directly from the image as a full page, there are settings and options that allow you to fit the image on a single page. However if your image is a lower resolution than your printer you'll get a more pixelated view.

JNavas2 commented 6 years ago

@joaowendel

What the image may (or may not) have is Resolution tags (from which DPI is calculated).

When you convert to PDF, Resolution tags (if any) can indeed matter when the process uses Resolution tags, but you can get whatever size you want if you print to PDF instead.

Below is a Print dialog from IrfanView to Adobe PDF. Note how you can select both "paper" size and image size, and how image size can be whatever you want. If you select something other than "Original size" then Resolution tags (if any) are irrelevant, and the results will be identical no matter what the Resolution tags (if any).

capture
joaowendel commented 6 years ago

I'm using the own Adobe Acrobat Pro option to merge files into a single PDF. It's very practical to merge a existing PDF file with a new image file, a spreadsheet etc. It uses the DPI settings (or tag) of each file and maintain it into the PDF file produced. It haven't an option to change this DPI value. So, it produces PDF files that contains pages with different "sizes" when displayed in monitor.

Take a look at this example. The small page is from a 300 DPI jpg file. The big page is from a 72 DPI jpg file... It´s a big problem to me:

image

So, knowing that this is defined only by a simple tag with a number, I think: maybe it's easy to add a feature like this to this amazing software! Remember: it's dificult to find any light software that can handle with this simple adjustment. I don't want to open Photoshop every time that I need to do it. And I think that this is the main principle of ImageResizer: turn the user's life easier.

joaowendel commented 6 years ago

So, in resume: to change the DPI value we just need to edit the EXIF information of the image file, like this softwares do. Can we implement this on Image Resizer? 😀

steveroot commented 6 years ago

We're moving off topic, but hopefully this is useful;

How are you capturing the image? Is it with a phone or a scanner?
Do you need a raw image, or will you always want the image to become a PDF for later processing/filing?

Most scanners (that I've seen & used over the last decade) have an option to scan to PDF directly (and I'm guessing all they're doing is encapsulating a JPG image scan into a PDF format, but that would resolve your need to edit tags as they assume the dimensions of the scan area/settings in generating the PDF).

My own workflow over the last few years has moved to using Google Drive Scan on my phone to capture images directly as PDF. Google Drive Scan automatically detects colour vs black and white and mostly crops to the page edges automatically. It saves the 'scans' as PDFs into a folder in my google drive and from there I pick them up and carry on. It also works well for multi-page scans. I believe Evernote has similar functionality and I'm sure there are others.

JNavas2 commented 6 years ago

@joaowendel

  1. I'm thoroughly familiar with Adobe Acrobat Pro and with other PDF tools.

  2. Read my Comments more carefully. If you print rather than convert you can easily get whatever size pages and images you wish with Acrobat Pro.

  3. As @steveroot suggested, you could scan directly to PDF. It's what I do.

  4. Resolution is not a simple tag. It's multiple tags, and those tags are optional.

  5. There are many tag editors readily available, including the one I mentioned.

  6. Image Resizer is a lightweight tool for resizing images. Adding tag editing would start feature creep toward buggy bloatware. Where would it end? I vote no.

joaowendel commented 6 years ago

@steveroot

This images that I use come from different sources, including images sent by Whatsapp from some colleagues (from payment vouchers, etc). And probably this is the main issue, because Whatsapp compression change DPI value of images to 72.

When I scan my own documents (in my own workflow without external files etc), I already use Dropbox tool to scan them and save in PDF format. It's very nice, like the Google Drive tool.

Thanks anyway for your kind suggestions!

joaowendel commented 6 years ago

@JNavas2

1. I'm thoroughly familiar with Adobe Acrobat Pro and with other PDF tools.

OK! Very nice!

2. Read my Comments more carefully. If you print rather than convert you can easily get whatever size pages and images you wish with Acrobat Pro.

Are you suggesting that I print in PDF a lot of jpg files, set the image print size, save them, and only then merge with my other files (doc, xls etc) to produce my final PDF file? Why should I get this long way if I can just correct the DPI value in this image files in a batch process with a single app and then merge all files? It's the same as I suggest that you use MS Paint to resize your images instead of ImageResizer ;)

3. As @steveroot suggested, you could scan directly to PDF. It's what I do.

I already do this - when it's possible!

4. Resolution is not a simple tag. It's multiple tags, and those tags are optional.

DPI is a simple tag. Dots per Inch. It´s about density of pixels. Doesn't mind the resolution. I can change it in an EXIF editor. Change 72 to 300, for example, and voilà, it works. I'm afraid that you didn't get the point. I'm NOT discussing about resolution! I'm talking about DPI and PRINT size - and that duo makes all sense. The result in a PDF file is the same as a print in a paper. It's not about resolution. It's about DPI. Let's take a test: merge two jpg files in a single PDF file, using a first jpg file with 1000x1000 pixels @ 300 DPI, and a second jpg file with the same 1000x1000 pixels, but @ 72 DPI. Now see the results:

72 dpi 300 dpi image

Got it?

5. There are many tag editors readily available, including the one I mentioned.

OK! But I'm suggesting a feature to ImageResizer. A very simple feature.

6. Image Resizer is a lightweight tool for resizing images. Adding tag editing would start feature creep toward buggy bloatware. Where would it end? I vote no.

Sorry, I disagree. This last version has a lot of good advanced options. A single box to optionally fix DPI value will be very very lightweight. And very easy to implement. And very welcome.

JNavas2 commented 6 years ago

@joaowendel

  1. It's hard to provide meaningful help when you withhold details.
  2. Ibid
  3. No matter how it's presented, DPI is not even a tag, much less a simple one. The tags (plural) are Resolution. Worse, there are also image size tags. Educate yourself on tags:
    • Exif.Image.ImageWidth
    • Exif.Image.ImageLength
    • Exif.Image.XResolution
    • Exif.Image.YResolution
    • Exif.Image.ResolutionUnit
  4. It's not a simple feature, and it's not relevant to the purpose of Image Resizer. Does everybody get an extra feature, or just you?
  5. I completely disagree, for the reasons stated. But only Brice has a vote that actually counts.
  6. Resources:
joaowendel commented 6 years ago

IrfanView does EXACTLY what I'm suggesting:

irfanview-dpi

Even the layout is similar to ImageResizer. Nice, clean, simple. Just one textbox, one value.

JNavas2 commented 6 years ago

@joaowendel

IrfanView does EXACTLY what I'm suggesting:

Excellent. Then your problem is solved. Good thing you finally got around to checking it out. Check out ExifTool while you're at it. And Exif tags, to clear up your confusion on DPI.

p.s. You're welcome.

joaowendel commented 6 years ago

@JNavas2

I know how to change a DPI with standard apps. IrfanView and ExifTools are in my computer since I was a kid. So I don't have a problem to solve.

I just have a feature suggestion to the developer, but I didn't expected that this place would have a extremist anti-feature dogwatch.

About "confusion on DPI", it looks like you really are unable to understand the point. Please go back 4 comments above and read it again. See the pictures, maybe it can help and clear up your confusion.

Well, my feature suggestion was registered, the work is done! It will be nice if it can help other users. Good bye!

JNavas2 commented 6 years ago

@joaowendel

Since you don't have a problem to solve, you shouldn't be asking for a feature that you still don't understand. And the nasty comments are both unwarranted and unwelcome.

Have a nice day.

bricelam commented 6 years ago

Image Resizer for Windows is a simple utility for batch resizing images. This feature is outside the scope of this product and won't be added. Image Resizer aims to do one thing, and to that one thing well.

There are plenty of great alternatives out there for editing metadata.

Someone could even fork this project and make a sister tool that is all about batch editing metadata.