Using fbi as slideshow causes portrait images to autorotate - linux

Im using a Raspberry Pi running Raspbian Wheezy as a digital photo frame. The Pi is configured to autologin on boot and execute a bash script that starts fbi as a slideshow, like so:
fbi -noverbose -a -t 10 /home/pi/Pictures/*.jpg /home/pi/Pictures/*.png
Ive noticed that any portrait photos (ie photos that are taller than they are wide) are automatically rotated 90 degrees so that appear as landscape.
If I remove the -nonverbose switch, the dimensions are displayed underneath each image and what was once a 480x640 pixel image is displayed as 640x480. Removing the -a autozoom switch doesnt help either.
Can anyone help get my photos displaying in their original orientation regardless of aspect ratio?

I know this issue is a little old, but I've been running into this issue as well and think I found the solution this morning. I think it has to do with the EXIF data rotate flag. From what I understand, all programs can handle this flag differently, or not even acknowledge it. So I believe the solution is to rotate the images and save them that way ignoring the EXIF data.
I plan on doing it using a windows program I found located here: http://www.makeuseof.com/tag/are-your-iphone-photos-refusing-to-rotate-in-windows-explorer-here-is-the-solution/

Related

How to set exact coordinates in a PNG image?

Platform: Linux
Tool: Qrencode (Open source application for creating QR code in linux)
I am using this qrencode application to generate QR code. The output file format that I am using is PNG. But when I try to print the PNG file using dot-matrix printer, it prints correctly but scrolls down whole page i.e. it occupies the whole page, but my requirement is that I should be able to print the image to any point of an page.
Unfortunately I don't have time to go through the entire source code of LIBPNG and QRENCODE.
I strongly recommend to check the man page for lpr
It has an option for positioning the image on the page, e.g. -o position=name.
Check the possible position names in the manual.
Most probably you would need to scale your images.
Be sure that your image is not too large for fitting in the page.

Landmasking in SAR geotiff image

I am trying to mask the land in a satellite (SAR) grayscale geotiff image. The functionality is available in rsgislib, but it works on Linux and I am working on conda python 3.5 (Windows) and not able to find a possible way out.
Kindly guide as to how the land can be masked out in an image.
I found the way out :
First we have to download an appropriate shapefile of the region we wish to mask,
then there is a beautiful functionality available in gdal called as gdalwarp. We need to just open the anaconda prompt and from there just type in :`
gdalwarp -cutline shapefile_name.shp original_image.tif output_filename.tif
Now, the image with borderlines of the land will get saved in the file output_filename.tif
This is the file which contains the land portion and the ocean is masked out.
Then the procedure becomes fairly simple mask out the land by subtracting the output_filename.tif image from original image.
We will get the image of the ocean part with land portion in black, after that we can make the land portion as NaN.

Big parallax with left and right eyes

When I use cardboard on a device which has a big screen, 5.5 inch.
And it's resolution is 2560*1440,dpi=640.
The question is that the parallax is too big, so that I can see two non overlapping images through a VR device.
So, what should I to to fix it?
Thanks.
It looks like your phone might be reporting an incorrect DPI, which prevents the SDK from drawing the two images at the right place on the screen.
According to the numbers you gave, the phone DPI should be around 534, not 640.
What is your phone model? Even better, could you give us the output of the following:
adb shell getprop | grep "model|manufacturer|hardware|product.name|lcd_density"
This way we could add a DPI override in the cardboard SDK for your phone model.

Render an SVG with filter effects to PNG

I would like to render an SVG I've created to a hi-res (600 DPI) PNG. This SVG has filter effects, specifically gaussian blur.
Ideally rendering could be done via the command line.
I know the SVG is renderable because you can open it in Chrome/Chromium and the output I'd like to see is there.
Things I've tried:
Importing to Adobe Illustrator
svg2png
Imagemagick
Inkscape
Other command-line tools and programs I'm forgetting right now. Basically anything you could find with Google.
Current path I'm pursuing but stuck on:
Knowing that Chromium can render the SVG just fine and that it's open-source, I figured I'd download the library Chromium depends on to render SVGs (Skia, https://sites.google.com/site/skiadocs/) and use it to output a PNG. So far I've succeeded in installing Skia and running the very first example. I've found an example that renders an SVG (https://code.google.com/p/skia/source/browse/trunk/samplecode/SampleSVG.cpp?r=875) but haven't successfully run it on my OSX machine with the latest updates to XCode and command-line tools. A modified version of that example (with gyp file) that outputs a PNG would be amazing.
Other ideas that might work:
Getting pixel data from Chrome (how would I do that? A simple screenshot isn't enough because of the resolution of the image. I also want a scriptable, repeatable process.)
Using other graphics library that can render SVG. Maybe this comes from other web browsers, maybe not.
This seems to work nicely:
webkit2png -F blue.svg -o rendered
The -F says to generate the Full resolution PNG and no thumbnails, and the -o specified that the output filename will be rendered-full.png.
I have reduced the size so it fits on Stack Overflow, but the command shown actually gives the full-resolution 2880x2880 image.

More iPhone 4 resolution scaling fun

So I have two images set to fill the screen - one at 320x480 (iPhone 3) and the other at 640x960 (iPhone 4).
img.png (320x480)
img#2x.png (640x960)
In Interface Builder, I have img.png set to fill the view (it shouldn't be filling the iPhone 4 view, though, right?), and when I build and run, it is notably too small.
So, when I do the opposite, setting img#2x.png as the img, a giant blue question mark fills the view. The project still builds and the image fills the screen, but is very pixelated as if it has been rescaled. It shouldn't have been rescaled, though, as it is the higher resolution.
Now using...
img.png (640x960)
img#2x.png (320x480)
I've also tried switching which file takes the #2x suffix, but that has not helped either. With the smaller file taking the #2x suffix, and setting the image view to img.png, it shows up way larger than the view canvas, but way too small when on the phone. With the smaller file still having the #2x suffix, I tried switching the view to the new img#2x.png and once again got the oversized, pixelated question mark in IB and a low res full-screen image when deployed to the phone.
I also made sure that my view size was set to 640x960 in the size inspector. What else should I be doing?
Don't use #2x when specifying the image name. Just use the base name of the image (so in your case, just img). iOS will do the magic behind the scenes to use the 2x version if it's on a retina display and the regular version otherwise (including when you use a xib to lay out your interface).
The displayed dimensions of the image will always be the dimensions of the non-2x image. The retina display just displays 2 pixels for every 1 which is why the scale is 2.0 and you have to double the dimensions of the original image. So your view size in IB should be 320x480.
Edit
If IB is being finicky, especially in Xcode 4, just try deleting the xib and starting over. Sometimes it gets a bit corrupted and doesn't know what to do with itself. I've had to do this on one or two occasions, and it seems that it worked for the OP as well.

Resources