Welcome Guest.   Make a donation to an author on the site November 23, 2014, 07:12:21 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the full one-year retrospective report on DonationCoder.com.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: DONE: app to rotate multi-page images  (Read 13740 times)
deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« on: June 29, 2010, 09:59:16 AM »

I often get faxes via email and these are always upside down.  Don't ask why.  I've tried and failed to find an application that will load up the TIFF file (for that is what it is), rotate each page by 180 degrees and then save it to jpg or pdf.  I want to upload the modified file to my project site where we keep all related messages and files in one place.

I'm literally tearing my hair out on this one.  Most apps will allows to rotate and save ONE page but the rest are never changed.

I am learning C# so if no one can help I will learn how to make a nice simple app (and presumably make millions because I can't be the only person who wants to rotate multi-page documents).

I see the application as having
* a button to browse to the file.  
* Then a rotate left, right and 180 degrees button.  
* A preview of the image
* A button to specify the output location.
* OK and Cancel buttons.

Any takers?  Kiss
Logged
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #1 on: June 29, 2010, 06:53:39 PM »

Perhaps the following doesn't work so well for you, but have you considered the batch operations in IrfanView?

The following outline is for version 4.25.

Menu ->
  File ->
    Batch Conversion / Rename

  • Press Advanced button
  • Select from among Vertical flip, Rotate left, Rotate right, etc.

Also possible via its thumbnail window:

Menu ->
  File ->
    Thumbnails ->

  • Select multiple images
  • Right click and choose "Start batch dialog with files"
  • Continue as described previously
Logged
deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #2 on: June 29, 2010, 07:21:12 PM »

Many thanks, it's a good idea but the problem with Irfanview is that it only does the current page you're on.  I think batching works on several files but it doesn't handle a multi-page tiff.

Perhaps the following doesn't work so well for you, but have you considered the batch operations in IrfanView?

The following outline is for version 4.25.

Menu ->
  File ->
    Batch Conversion / Rename

  • Press Advanced button
  • Select from among Vertical flip, Rotate left, Rotate right, etc.

Also possible via its thumbnail window:

Menu ->
  File ->
    Thumbnails ->

  • Select multiple images
  • Right click and choose "Start batch dialog with files"
  • Continue as described previously
Logged
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #3 on: June 29, 2010, 09:23:09 PM »

Sorry -- I failed to understand your original post accurately smiley  However...

...but the problem with Irfanview is that it only does the current page you're on.  I think batching works on several files but it doesn't handle a multi-page tiff.
I was looking at the "Set for all images" dialog (what comes up after pressing the Advanced button), and I noticed a check box with the label "Apply changes to all pages (if TIF saving)".



Does that not help in this situation?
Logged
deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #4 on: June 29, 2010, 10:15:27 PM »

Afraid not!  Sad

I've had a good go with Irfanview and was amazed, given the millions of options and buttons, that it won't do what I want.

Sorry -- I failed to understand your original post accurately smiley  However...

...but the problem with Irfanview is that it only does the current page you're on.  I think batching works on several files but it doesn't handle a multi-page tiff.
I was looking at the "Set for all images" dialog (what comes up after pressing the Advanced button), and I noticed a check box with the label "Apply changes to all pages (if TIF saving)".
 (see attachment in previous post)
Does that not help in this situation?
Logged
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #5 on: June 30, 2010, 12:35:41 AM »

Afraid not!  Sad

I've had a good go with Irfanview and was amazed, given the millions of options and buttons, that it won't do what I want.
It is surprising -- unfortunate too.

I looked at the "Command Line Options" section of IrfanView's help file and saw some things which looked relevant:

Quote
/filelist=txtfile -        use filenames from "txtfile" as input, see examples below
...
/rotate_r -        rotate input image to right
/rotate_l -        rotate input image to left
/hflip -        horizontal flip
/vflip -        vertical flip
...
/multitif=(tif,files) -        create multipage TIF from input files
...
/extract=(folder,ext) -        extract all pages from a multipage file

I don't suppose a combination of some / all of these and possibly other options might be of any use...
Logged
deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #6 on: June 30, 2010, 05:09:58 AM »

Many thanks for your persistence in this matter smiley

Well command line eh?  That last /extract option looks interesting and I'll give it a go later this evening when I'm back from work.  I'm not sure I see that as a long-term solution, assuming it works, as I would like an easy to use GUI that I could give to a friend who also gets these faxes.

I really am intrigued by trying to code something myself.  At the moment all I really know in C# is that the lines all end in ; smiley

#
Afraid not!  Sad

I've had a good go with Irfanview and was amazed, given the millions of options and buttons, that it won't do what I want.
It is surprising -- unfortunate too.

I looked at the "Command Line Options" section of IrfanView's help file and saw some things which looked relevant:

Quote
/filelist=txtfile -        use filenames from "txtfile" as input, see examples below
...
/rotate_r -        rotate input image to right
/rotate_l -        rotate input image to left
/hflip -        horizontal flip
/vflip -        vertical flip
...
/multitif=(tif,files) -        create multipage TIF from input files
...
/extract=(folder,ext) -        extract all pages from a multipage file

I don't suppose a combination of some / all of these and possibly other options might be of any use...
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: June 30, 2010, 05:40:32 AM »

I think I'm going to take a crack at this one.
Logged

deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #8 on: June 30, 2010, 06:49:16 AM »

I think I'm going to take a crack at this one.

Hey nice one! 
I'll race you - i'm on chapter 3 of C# for Dummies.  smiley
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: June 30, 2010, 06:55:17 AM »

Some questions:

1) When you get one of these TIFF files, are all the pages mis-rotated in the same orientation?
2) Do you normally only work with one TIFF at a time?  Or do you work with several of these TIFFs at a given time?
3) Are you able to provide me with a sample TIFF file that you deal with?
Logged

deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #10 on: June 30, 2010, 07:41:46 AM »

1) Yes they are all mis-rotated, i.e always upside down.  If I get a 20 page document it's annoying.
2) yes one TIFF at a time.  I download it then usually have to print it off as I can then actually view them without much pain.
3)  I can arrange to supply one of them - how should I get it to you?

1) Great, that makes things easier to deal with.
2) Okay.  However, would you like this app designed so that you could handle multiple TIFF files in a batch?  Or is a single-use type of design more what you're after?
3) You can try attaching it in a PM to me.  Failing that, you can try emailing to skwire@dcmembers.com or skwire@skwire.net.

Thanks.
« Last Edit: June 30, 2010, 07:48:35 AM by skwire » Logged
deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #11 on: June 30, 2010, 08:01:17 AM »

I guess it would be cool if it could handle TIFFs in a batch - come to think of it i might want to download a few old ones and fix them - so yes to that one!

I'll get a file to you asap though the ones I have all contain financial data I can't pass on in any circumstances so I shall request an innocuous fax and will then forward  that on - probably tomorrow, as I'm stuck at a client site in a small, sweltering room...
Logged
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #12 on: June 30, 2010, 08:02:18 AM »

I tried creating a multipage TIFF image with upside-down content for fun using IrfanView.

.TIF files didn't seem to be acceptable so I'll try uploading a zipped TIFF.

* upside-down-multipage-content.zip (98.03 KB - downloaded 147 times.)
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: June 30, 2010, 08:47:16 AM »

I've created some test TIFFs as well but I wanted at least one of the ones he's dealing with as well.  =]
Logged

ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #14 on: June 30, 2010, 09:07:20 AM »

Sounds like a good idea  thumbs up
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #15 on: June 30, 2010, 09:40:38 AM »

Here's where I am now...

Logged

deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #16 on: June 30, 2010, 12:03:57 PM »

Thanks skwire, that's looking neat.  I have forwarded the email i get when i receive a fax.  Funnily enough i managed to fax it the right way around the first time, so i had to refax it again to get it wrong smiley  
What this proves is that everyone we know can't load a fax machine correctly!



Here's where I am now...
 (see attachment in previous post)
« Last Edit: June 30, 2010, 02:24:29 PM by deano » Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #17 on: June 30, 2010, 11:55:26 PM »

Thanks, attachment received.   cheesy
Logged

skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #18 on: June 30, 2010, 11:57:59 PM »

Oh, one more thing.  Did you want the original TIFF "repaired", so to speak?  As in:

1) Extract all pages.
2) Rotate them as needed.
2.5) Make new multipage TIFF from rotated files.
3) Convert them to jpg/pdf.
4) Move them to desired destination folder.

Your thoughts?
Logged

JavaJones
Review 2.0 Designer
Charter Member
***
Posts: 2,537



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #19 on: July 01, 2010, 12:32:23 AM »

Three other possible options to look at before you get too deep into coding a custom solution:

http://www.xnview.com/ - similary to Irfanview but IMHO superior, try batch processing
http://www.imagemagick.org/script/index.php - a powerful commandline image processing library/system
http://djv.sourceforge.net/ - try DJV_convert.exe and commandline options, designed to deal with complex images for visual effects, which often have layers, so it may automagically do what you want

- Oshyan
Logged

The New Adventures of Oshyan Greene - A life in pictures...
deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #20 on: July 01, 2010, 02:34:48 AM »

Yes, that sounds about right. I'm happy with having a fixed TIFF - in the same way as if they had faxed us the correct way up in the first place smiley

Oh, one more thing.  Did you want the original TIFF "repaired", so to speak?  As in:

1) Extract all pages.
2) Rotate them as needed.
2.5) Make new multipage TIFF from rotated files.
3) Convert them to jpg/pdf.
4) Move them to desired destination folder.

Your thoughts?
Logged
deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #21 on: July 01, 2010, 02:58:49 AM »

I tried xnview with no joy.  Haven't tried the others, and certainly not any command line aspects as that didn't occur to me.  I would prefer a simple program to solve the problem because I can then offer this to my colleague and whoever else needs to save such files for posterity.
It would also save paper because the first thing my colleague does it to print them out - and we often get long listings, bank statements etc which could be viewed onscreen.

Three other possible options to look at before you get too deep into coding a custom solution:

http://www.xnview.com/ - similary to Irfanview but IMHO superior, try batch processing
http://www.imagemagick.org/script/index.php - a powerful commandline image processing library/system
http://djv.sourceforge.net/ - try DJV_convert.exe and commandline options, designed to deal with complex images for visual effects, which often have layers, so it may automagically do what you want

- Oshyan
Logged
ewemoa
Honorary Member
**
Posts: 2,491



View Profile Give some DonationCredits to this forum member
« Reply #22 on: July 01, 2010, 03:04:56 AM »

FWIW, I tried XnView without much success too -- seems like a nice program though.  Thanks for suggesting it JavaJones  Thmbsup
Logged
skwire
Global Moderator
*****
Posts: 4,158



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #23 on: July 02, 2010, 12:57:03 AM »

I'm promise I'm still working on this; apologies for the delay.
Logged

deano
Charter Member
***
Posts: 33


View Profile Give some DonationCredits to this forum member
« Reply #24 on: July 02, 2010, 04:29:08 AM »

No rush at all mate, it's lovely that you took this one!

I'm promise I'm still working on this; apologies for the delay.
Logged
Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.044s | Server load: 0.1 ]