Extension talk:PagedTiffHandler

About this board

How to fix TIFF/TIF files uploading as two pages instead of one

1
Guillaume Taillefer (talkcontribs)

I'm trying to test out uploading some single-paged tiff files of old documents that I scanned, and whenever I upload them to my wiki, they almost always show that theres two pages of the tiff file(s) that you can look that. Theres two ways that this shows, the most common being that the first page will be a grey background with an error message saying: Error creating thumbnail: File with dimensions greater than _#_ MP, with the second page being the actual tif file that I uploaded. While uploading them through UploadWizard, it shows that the thumbnail wasn't able to be created (represented by a broken file), with an error message saying:

The upload succeeded, but the server could not get a preview thumbnail.

I had asked about this stuff elsewhere, and Bawolf told me that I should modify the $wgMaxImageArea to fix the first problem, however when I even set it to even 10e7, it would still give me the issue, although a different number in MP.


The second issue that I would have is that I would do the same thing, but instead it would give me a thumbnail, but there would still be two pages, one being a duplicate of the other. The first page had this under the image: Size of this JPG preview of this TIF file: 800 × 522 pixels. Other resolution: 2,560 × 1,671 pixels. (each pixel size with their own link), and the second page being: Size of this JPG preview of this TIF file: 800 × 522 pixels.


But then theres sometimes when theres a tiff that doesn't do this, and theres just one tiff page, without duplicates or errors.


If anyone could help that'd be great, thanks.

Reply to "How to fix TIFF/TIF files uploading as two pages instead of one"

Unable to run external programs, proc_open() is disabled.

5
Bmrberlin (talkcontribs)

Error Message: Die hochgeladene Datei ist fehlerhaft: identify command failed: "/usr/bin/identify" -format "[BEGIN]page=%p\nalpha=%A\nalpha2=%r\nheight=%h\nwidth=%w\ndepth=%z[END]" "C:\xampp\tmp\phpC9C6.tmp" 2>&1

The setup points to a correct path: $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'tif', 'tiff' ); $wgImageMagickIdentifyCommand = 'C:\Program Files\ImageMagick-6.9.1-Q16\identify.exe';

I tested ImageMagick with this path. Works perfectly! C:\Program Files\ImageMagick-6.9.1-Q16>identify BMI_Pantagruel.tiff BMI_Pantagruel.tiff TIFF 2472x3508 2472x3508+0+0 8-bit Grayscale Gray 8.672MB 0. 000u 0:00.000

Please assist

Kghbln (talkcontribs)

Hmm ... so this happens only to German language wikis?

Bmrberlin (talkcontribs)

I only use the German Mediawiki version in two installations. So I cannot provide examples of other languages. Allet Jute

Bmrberlin (talkcontribs)

This is the error message:

Fehler beim Erstellen des Vorschaubildes: Unable to run external programs, proc_open() is disabled. Error code: 1

Any idea

Reply to "Unable to run external programs, proc_open() is disabled."
Leucosticte (talkcontribs)

Sometimes the best way to handle a tiff is to just sit down with the person, have a few beers and discuss your differences in a way that remains assertive while taking responsibility for your own reactions to their behavior. "I statements" sometimes work well.

Mglaser (talkcontribs)

Good point. Maybe we should not rely too much on handling every squabble online and automated ;) (cf. wiktionary:tiff)

Reply to "Tiff handling"
SmartK (talkcontribs)
  • 2012.01.03: Sadly I get the following error message on most of our "TIFs" files: "Fehler beim Erstellen des Vorschaubildes: Die Quelldatei hat eine zu hohe Auflösung. Es wird kein Thumbnail generiert. (in my German Wiki)"
I changed the following settings but without any success:
// Maximum resolution of embedded images (product of width x height pixels)
#$wgTiffMaxEmbedFileResolution = 25600000; // max. Resolution 1600 x 1600 pixels
$wgTiffMaxEmbedFileResolution = 102400000; 
// TTL of Cacheentries for Errors
#$wgTiffErrorCacheTTL = 84600;
$wgTiffErrorCacheTTL = 10;
// Use vips
$wgTiffUseVips = true;
// Path to vips
$wgTiffVipsCommand = '/usr/bin/vips';
  • Does anyone have a clue? thank's...
Kghbln (talkcontribs)

You should write in English to increase the chance of getting an answer. Cheers

SmartK (talkcontribs)

I know. But as the programmers are German anyway I thought it would make no difference ;-)

Mglaser (talkcontribs)

It makes no difference for me (one of the programmers), but might not help other users ;) Sorry, though, for my late answer. There is a configuration parameter $wgMaxImageArea, that limits the size of images that thumbnails are created from. This is set to 3500 x 3500 px as a standard. You might try to increase this. (see Manual:$wgMaxImageArea)

SmartK (talkcontribs)

Thank you Mglaser. I will try this next week and will then post the results. I also translated my question above into German ;-)

SmartK (talkcontribs)

Sadly no change. I added the following:

// $wgMaxImageArea: Default is 50 MB if decompressed to RGBA form, which corresponds to 12.5 million pixels or 3500x3500.
$wgMaxImageArea = 100;
  • This is the error MediaWiki prints: "Fehler beim Erstellen des Vorschaubildes: Die Zieldatei hat eine zu hohe Auflösung. Es wird kein Thumbnail generiert."
    • This is the tiff:‎ ((Seite 1, 2.304 × 1.600 Pixel, Dateigröße: 21 KB, MIME-Typ: image/tiff))
Mglaser (talkcontribs)

Hm, well. Is it a multipage tiff? Can you possibly mail me the image so I can test it locally (wm@markus-glaser.de)?

SmartK (talkcontribs)

no, it's not. Just a big format. I just sent you the sample file.

SmartK (talkcontribs)

Hello Markus, any news on this subject? I would appreciate it!

Reply to "zu hohe Auflösung"

Standard configuration settings?

4
92.72.130.209 (talkcontribs)

It would be nice to mention the standard configuration setting so as to not have us copy all setting unnecessarily. --92.72.130.209 17:30, 20 January 2012 (UTC)

Kghbln (talkcontribs)

The documentation is a bit messy. Ideed this should be changed.

Mglaser (talkcontribs)

Ok, good idea. Most of what's described on the extension page are standard settings. However, I have to double check and will mark them appropriately.

Mglaser (talkcontribs)

Done. Does this help?

Reply to "Standard configuration settings?"
There are no older topics