Using retina.js script. Non-retina images do not display at all - retina.js

I'm trying to use the retina.js script. If I understand correctly, when there is no #2x version of an image, the regular image is supposed to display. This is not what is happening for me, though. The regular version displays for a second and then disappears.The images that I do have #2x versions of are properly replaced, however.
It's like the script looks for a #2x version, if doesn't find it, it displays nothing.
Is this the way it is supposed to work?? Is there something within the script I need to change? I don't want or necessarily need to have #2x versions of all my graphics.
I'm testing on an iPad3 and iPhone4S

Related

Show dimensions of PNG-files in OS X Yosemite Finder preview

I have a bunch of very similar images and would like for a quick way to see the dimensions of each image, without having to opening it first.
Finder does supports this natively, but for some reason it doesn't show the dimensions for some of my PNG images: Example
Others work.
Anyone know how to fix this? Plugin to Finder maybe?
Don't know the cause, but suddenly it started working again - might have just needed a reboot.

What is the system tray icon size for retina display?

I've created a Qt5 app using PyQt5, now I am adapting images to be compatible with Retina Display on OS X. I've creating duplicates of them with the #2x modificator, but the fact is that I've not been able to make the tray icon to look correctly, I think it is because I am using the image in the wrong size.
Does anybody have any idea?
I don't know if this works with Qt, but you can use a combined file with Xcode.
Within Terminal, you can combine both icons by executing this command:
tiffutil -cathidpicheck tray_icon.png tray_icon#2x.png -out tray_icon.tiff

Why are the new (1.10.0) jQuery UI images the wrong color in Firefox?

I'm currently using jQuery UI 1.9.2 and want to upgrade to 1.10.0. I have a custom theme and used the URL at the top of my CSS file to visit the ThemeRoller.
My colors didn't look right, so I went through and double checked all my settings. I was using 3-digit hex colors and tried changing them to 6 digits, but that didn't help anything. I cleared my cache and restarted my computer. No change.
I started digging a little deeper. I opened the image in PSP, the colors are fine. They also appear fine in Safari and Chrome. They look fine in Firefox 12 on the laptop, but not in Firefox 12 on the PC (Win XP on both machines).
I thought maybe there was an add-on messing with my colors. But I opened the 1.9.2 image file in Firefox and it looks correct.
1.9.2 -> 1.10.0 ->
I just added the two images to this post from my own computer. I'm looking at the preview with the images side-by-side. The one on the left (1.9.2) is the one I want. The one on the right (1.10.0) looks much more purple on my screen. The background color is supposed to be #0066cc. I used a color picker to view the color displayed by Firefox. The 1.10.0 version has a background color of #4756c7. I see the same problem with all the new images, even the flat ones.
I looked at the two files with ExamDiff Pro and they are very different. Plus, all the new images are larger than the old images (more than twice as many bytes).
Luckily, I only copied over the CSS file and the new animated-overlay.gif, so I am just going to keep using the old images. But I want to understand what's going on.
So what did jQuery UI do differently when generating their images? And why did they change them? And why does Firefox 12 on my computer show them with different colors?
Hard to say exactly without seeing the actual files, but it sounds like browser variations in the way that ICC color profiles are being handled. More details on FireFox specifically over here. But it might not be FireFox being the problem & more connected to whatever your main development browser is & how it handles ICC profiles as well.
Like the FireFox article implies, the feature is fairly old in many browsers but what I have noticed is many modern browsers nowadays are actually paying attention to ICC profiles as a default, whereas before that feature was disabled by default.
Which is all to say I would see how these images look if you strip out all EXIF metadata using a tool like exiftool. Without an embedded ICC color profile, the images should render similarly between all browsers.
And to strip out all metadata with exiftool you would just run a command like this; assuming your file is named test.jpg:
exiftool -all= test.jpg
You will end up with a backup file tagged as test.jpg_original that still has EXIF data embedded and a cleaned test.jpg that now is 100% stripped of EXIF data.

#2x images do not display in XCode4 interface builder designer

I'm trying to design a xib using XCode4, but when I put down an image view that displays an #2x image xcode doesn't preview it correctly (it displays a missing image icon).
It works correctly when the app is run though.
As an example: I add a UIImageView to my view and set the image property to test.png.
In my project I add a file named test#2x.png.
In XCode 3.2 this image would have correctly displayed in IB, and the #2x version would have automatically half-sized on non-retina devices.
However in IB in XCode4 the image does not display.
Is anyone else experiencing this? If they are, it's a pretty massive issue.
Why not just add both images? AFAIK UIImage isn’t guaranteed to work like that.
I always use both sizes, having the #2x ones first, and unretining them using the free app unretiner from app store, and drop both sizes to the project. When referring to an image, instead of writing test.png or test#2x.png, I write test and xCode finds sizes to the corresponding devices, but YES! in IB, the image won't be displayed in this way, just a question marked blue screen; but that works fine when running the app.

iphone 4 - Application doesn't show image?

I've had this app on app store with no problem until iphone 4 came out.
My home page has an image covering the whole screen.
UIImageView added in interface builder, and image path added in interface builder.
In all phones this image shows up; however, the image does not show up in any iphone 4, and instead the user sees a blank screen like the following:
Anybody knows what's causing this? thanks
.
I only have 1 set of images with
normal resolution
This problem only happens to one of
the images in my application which is
the background for my home page
the graphic file should not be
corrupted because the exact same
image works for all other iphones and
itouches
my image is a jpg file
image size is 480x270, which in
interface builder i make it 563x330 to display only a part of it
I have no outlet to this uiimageview
so it cannot be changed in code
With devices with the new retina display, pixel sizes are different and you have to check for the following, in particular:
Do you provide two alternatives of the image, one at old resolution, one at double resolution (named myimage.png and myimage#2x.png)
If not, does your image scale up well in size with CoreGraphics's algorithms (there are some pathological cases, though you'd have to be quite unlucky)?
Have you checked what happens (at both resolutions) when your UIImageView size changes?
Is it just one image, or all?
Is your graphics file corrupted?
It's hard to tell if it's any of these points, or something else, because you provide so damn little detail, that I stick to generic things. Comment below (or edit your question) if you need more help.
I've got two things to add to FXs thorough answer:
Considering the information you added, I would take a look at your code for setting up that UIImageView. Perhaps you use some sort of detection code or something which wasn't implemented correctly.
Would you mind sharing some code snippets?
According to Apple's documentation, you don't need to provide the ".png" extension as of iOS 4. Perhaps that is causing the problem.
Again, code snippets would help here. Specifically where you deal with loading up your image file.
EDIT:
Try re-saving the image and replacing it. I've occasionally corrupted files in Photoshop. This has to do with file extensions and how Mac OS ignores them, but Photoshop still uses them.
Also, it could have to do with where the image is in your XCode project. Check what Group it is in. Make sure everything is in place and then Clean and Rebuild. Remove the app from the iPhone4 (reboot) and try reinstalling.
I hope this helps.
Good luck!
If this was my code, I'd write a tiny app just to display the image in question. If it still fails it would be easier to get help debugging the problem.

Resources