DjVu thumbnails are not being generated at all - thumbnails

I have DjVu installed on a MediaWiki wiki, but the thumbnails are not being generated at all.
I'm getting the DjVu logo and "(0 × 0 pixels, file size: 13.36 MB, MIME type: image/vnd.djvu)"
What can be done to make the thumbnails generate as they should?

I guess the files just need to be completely reuploaded.

Related

Generate webp image in TYPO3 Fluid

I am trying to have TYPO3 10.4.12 generate webp images as described in the example on this page: https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.3/Feature-90416-SpecificTargetFileExtensionInImage-relatedViewHelpers.html
{f:uri.image(image:images.0, fileExtension: 'webp')}
I am using GraphicsMagick and with gm version I get
WebP yes
and converting a picture to webp manually via command line works.
Also cwebp is installed.
If I try fileExtension: 'png' it generates a png file so the parameter seems to work.
However the image does not get converted, instead the original unprocessed image gets referenced.
The main problem seems to have been that I needed to add webp to the [GFX][imagefile_ext] configuration.
Additionally sometimes it only worked after removing all generated images under Remove Temporary Assets in the Maintenance section.
Yes that is true, webp must be added to image file list. In addition we faced another problem with webp. If you create an image as jpg with a width and after that the same image as webp also in the same width, only the jpg was generated. That's why we added 1px to the jpg images.
Now nearly all picutures are delivered in a modern way on https://www.in2code.de

Why does one of my pngs have a query string attached?

I'm not using any WP cache plug ins. I've noticed that only one png out of the other pngs (and other images) I have on my WP site has a query string attached to it when I look at in Chrome dev tools. It's actually downloaded twice - with and without query string.
The other odd this is that Chrome Dev tools says that the intiator for the png with query string is jQuery. I just include jQuery from Google's CDN, so I'm not changing anything.
Any ideas to why just one of my pngs (why this one?) has a query string attached? Here's what it looks like:
<img src="http://www.mysite.com/wp-content/themes/myTheme/images/slide1Btn.png?1369071380764" alt="">
Please let me know if I haven't included enough information.
Edit
This png is a button on one of the slides I have in a slideshow. I use http://archive.slidesjs.com/ to generate the slideshow. The png images are part of the HTML markup and not generated by the script, however I did find this line in the slides.js code:
// gets image src, with cache buster
var img = control.find('img:eq(' + start + ')').attr('src') + '?' + (new Date()).getTime();
I would like to just have the png load once and just be retrieved from the cache on reloads - like each of the pngs will do on subsequent slides in my slideshow. I'm perplexed as to why it only happens to this png.
It might either be :
some argument for a script that dynamically generates or resizes or processes the image (it does not matter that the url has a .png extension, that doesn't necessarily mean that a png file is served statically)
a "cache breaker" - or "cache buster". This can be used to prevent the browser (sometimes also the server) to get the image from a cache, and force it to get it fresh from the server.
Because in this case this looks as a timestamp (unix epoch in milliseconds), I'd bet for the later.
wordpress generates many of the images dynamically, meaning when you access the png you are calling a server page that generates the png dynamically choosing between different images or based on the query string parameters, like size for exmaple.
200px width image.
http://mysite.com/wp-content/uploads/2013/05/Giant_water_bugs_on_plate.png&w=200&h=446&zc=1&q=100
vs
600px width image
http://mysite.com/wp-content/uploads/2013/05/Giant_water_bugs_on_plate.png&w=800&h=446&zc=1&q=100

Facebook Share Dialog image doesn't show

I'm using the Facebook Share Dialog (https://developers.facebook.com/docs/reference/plugins/share-links/) and the image doesn't appear. I've checked a lot of posts here in SO an other forums but couldn't find a solution
I found this site where Share Dialog works correctly: http://election.gv.my/ (They don't use meta property="og:image")
https://www.facebook.com/sharer/sharer.php?s=100&p[url]=http%3A%2F%2Felection.gv.my%2F&p[images][0]=http%3A%2F%2Felection.gv.my%2Fassets%2Fcombined.jpg&p[title]=Malaysia+Twitter+Popularity+Index&p[summary]=Malaysia+Twitter+Popularity+Index+for+March+31%2C+2013%3A+%40anwaribrahim+21%2C+%40NajibRazak+28
If I use its image in my code, it shows:
var sharer = "https://www.facebook.com/sharer/sharer.php?s=100&p[url]=" + shareURL + "&p[images][0]=" + "http://election.gv.my/assets/combined.jpg" + "&p[title]=" + shareTitle + "&p[summary]=" + shareExcerpt;
If I use my image in its code it doesn't:
https://www.facebook.com/sharer/sharer.php?s=100&p[url]=http://election.gv.my/&p[images][0]=http://mysite.com/app/wp-content/uploads/2013/03/poster.jpg&p[title]=Malaysia+Twitter+Popularity+Index&p[summary]=Malaysia+Twitter+Popularity+Index+for+March+31%2C+2013%3A+%40anwaribrahim+21%2C+%40NajibRazak+28
The only reason I can think of is something in the server configuration. I've checked my url (website & image) in https://developers.facebook.com/tools/debug and the results are OK, at least the same as that site
The problem in my case was image sizes generated by WordPress:
NO: 85x85, 96x54, 166x94, 170x96, 193x108, 711x400
YES: 356x200, 360x124
https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content/
og:image – This is an image associated with your media. We suggest that you use an image of at least 200x200 pixels. However, bigger is better, so if you have a 1500x1500 image that you can use, please use it. We'll downsample and crop it for for people using smaller-resolution devices but will use it on a larger device. The larger this image is, the more likely it will be used when sharing stories on Facebook. (Note: image sizes must be no more than 5MB in size.)
But this doesn't explain why size 356x200 is ok but no 711x400 wich is bigger and has the same aspect ratio
Try reducing the file size: I changed from 56 to 24 and it then loaded.
Try adding a second "&" before "p[images][0]" => "&&p[images][0]"

download from rails to iphone zipped file missing portions

I'm using send_file to download a zipped file consisting of multiple images, from my rails server to my iPhone. On Rails I am using Zip::ZipOutputStream.put_next_entry which I think comes from rubyzip. On the iPhone I am using ZipArchive to unzip the file back into multiple files into memory using UnzipFileToData. The problem I run into is that the bottom portions of the images are black by random amounts. Some images have no blacked out portions, others have up to half of the bottom part of the image blacked out. The images are small, around 20 KB in size.
The problem I have is that I cannot figure out what portion of the path from rails to iPhone is causing the images to have their bottom portions blacked out.
1. I've ftp'ed the zipped file from my Rails server to my Mac and unzipped them and the images look fine, which means the images are getting zipped on the Rails server correctly.
2. I've tried reversing the order that the images are added to the zip file, but the same amounts of the bottom of the images are blacked out.
3. Could it be that different compression levels are being used?
Anyone have any idea why the unzipped images from a multi-file zipped file would be missing random parts of the bottom part of the images?
Found the solution here. My rails code originally looked like:
Zip::ZipOutputStream.open(zipped_file.path) do |z|
user_photo_array.each do |file|
z.put_next_entry(File.basename(file))
z.print IO.read(file)
end
end
and as the link above noted, IO.read is problematic for binary files, so I followed the link's suggestion and replaced IO.read with File.open(file, "rb"){ |f| f.read } as
Zip::ZipOutputStream.open(zipped_file.path) do |z|
user_photo_array.each do |file|
z.put_next_entry(File.basename(file))
z.print File.open(file, "rb"){ |f| f.read }
end
end
and that fixed the problem!

Divide PDF Page using C#

I have A4 size PDF page. PDF page contains 10 images. I want to split the PDF page as 10 image files. Plz give me an Idea.
You can use PDFBox (a library available for .NET) to convert each page of the PDF to a PNG image, then use the GDI functions in C# to copy known regions of the PNG files and save them as individual image files. This only works if the layout of the images on each page is static.
More info on PDFBox:
http://studentclub.ro/lucians_weblog/archive/2007/03/22/read-from-a-pdf-file-using-c.aspx
PDFsharp seems to be a popular open source choice for PDF manipulation from .NET and Mono. PdfMod is a related Mono-based front-end.