I am running the apple sample project of ARKit 1.5 Image detection
but when I place my reference image inside AR Resource folder and run the app I get following error:
Make sure all reference images are greater than 100 pixels and have a positive physical size in meters.
I don't find any predefined requirements of how should the image be, can anyone explain the required attributes of the image?
As in Apple's documentation
For each image, use the inspector to describe the physical size of the
image as you’d expect to find it in the user’s real-world environment,
and optionally include a descriptive name for your own use.
Click on your image and chose size inspector to provide size. :)
In my particular case, the dimensions were set and the image was named. But the name itself was invalid because I had another file (of a different type) named the same.
If the accepted solution cannot solve your issue, try changing the AR Resource's name.
I had same problem. Solved by using JPEG format instead of PNG
Related
I'm tempted to provide the highest resolution icon and let iOS scale it down as necessary. Is this a bad idea, and (if so) why?
you'll definitely want to produce files of various sizes as required by xCode. You want to make sure that the file presented when the app runs is of a high quality.
There are tools out there that will automatically create all the sizes you need for your app icon. Here is a link to the site that I use: https://makeappicon.com/
Hope that helps!
Yes, it might be bad idea. If your icon art was produced using a vector image editor (e.g., Adobe Illustrator, Adobe Photoshop with vector primitives, Sketch, etc) you best bet is to export all required resolutions yourself. In doing so, you will guarantee the best possible output for each resolution.
Keep in mind that exporting a single high resolution image and then resizing, for each required resolution, using a bitmap editor (e.g., macOS Preview) won't produce the same results.
PS. As already pointed out, I'm not sure your binary will even be accepted by Apple if missing icon data :-(
I am working on implementing a zoomable image viewer using OpenSeadragon and deep zoom images. I used the VIPS command line tool to create DZI files. My question is, does the original image used to create DZI files need to meet specific requirements to make it zoomable? (like format, size, etc.) If a normal .jpg image is converted to DZI, it seems like the image will not be zoomable. Is this correct?
My question is, does the original image used to create DZI files need to meet specific requirements to make it zoomable?
No, except to have a resolution higher than the screen resolution (in that case, the original image can be displayed directly).
Im programming an app in xcode and something has recently come to my attention when designing app icons. Here is the current setup that I have in my project:
Right now I have a 87x87pixel image for the "29pt" option (far left of the image), I also have a 120x120 for the 40pt option(middle) and I have a 180x180 pixel png for the 60pt option(far right). This seems highly inefficient, not only this but I need to supply #2 resolution images too? Surely there is a better way of doing this?
There are a couple of approaches I've taken in the past. One way is to create your icons, etc. in GIMP, Photoshop, etc. If you need to resize them, there's a command line utility called ImageMagick which I find to be a lot easier for resizing images than setting sizes in an image editor. The command you would use for resizing is called mogrify.
Option two is to get your hands on an app called Asset Catalog Generator. You just dump your images in and it spits out the correct file sizes and naming conventions. It's probably the best $4.99 I've spent in a long time.
Update
It appears someone has written a script to create the icons, too. I haven't used it myself, so you might want to poke around and look for others.
Create your app icon (once) at a decent resolution say 1024x1024. Drop the file into MakeAppIcon (a free service) and out pops all your icons in a zip file properly sized, enhanced as necessary, and rendered. Just drop them into images.xcassets and you're done. This avoids having to tweak any icons that may be off by a pixel or two and avoids those annoying Xcode warning messages.This vendor also offer a service for bulk uploading your iTunes screenshots, but I haven't tried that yet. Luv it!
You can use the vector-based images from a PDF. Session 411 from WWDC “What’s New in Interface Builder” discussed—albeit very briefly—Xcode’s support for creating your PNG files at build time from a vectorised PDF.
There is good article on this, you can refer that as well. http://martiancraft.com/blog/2014/09/vector-images-xcode6/
(Note that this does NOT cover PDFs for icons, just for images)
I would suggest you try SquareIcon, which I believe makes creating Xcode app icon sets very easy. Just to let you know, this is my own app.
The app allows you to drop in a generic image file (like a JPG or PNG) and convert it to a .appiconset file which you can put into your project's asset catalog. This takes care of all the naming and resizing that you might have to do manually.
UPDATE 2: I might've misunderstood you. When I wrote this answer, I thought that by 'inefficiency' you meant memory consumption and the resulting app size. If you meant, that making an icon for all the sizes is a lot of work, and you're looking for a better way to do it, consider looking at Adrian B's answer instead.
First of all, no, there is no more efficient way of doing it (unfortunately). Xcode supports vector images, but they are only supported on OS X, AFAIK. On iOS it just generates all necessary images at compile time.
Second, the app icon is small. You won't save a lot of space by optimizing app icon size. If you need to decrease the app size, try finding something that really takes much space. The icon doesn't.
UPDATE: Luckily, Apple realizes, that forcing everybody to download resources that they don't need is no good. So they introduced App Thinning along with iOS 9. I haven't looked into it thoroughly yet, but the general idea is that you upload a binary containing all the resources as usual, but when your users download the app from the AppStore, they get a version containing only resources that they need.
I'm looking for a way using the filepicker-rails gem to specify the image size. For example I would like to make it so my users cannot upload an image smaller than say 400 x 600 pixels.
Reading the docs I can only find the max file size in bytes, nothing about dimensions. Does anybody know how to accomplish this?
For now FilePicker API doesn't provide a feature of limiting files' sizes by dimensions (only by bytes as you have already mentioned).
What you could do is check the dimensions' of files and if they are lower than desired (400x600 in your case) then convert them to this minimum size using FilePicker's conversion feature.
Filepicker's new API has an option Image Dimensions where you can specify the height and width. With this local images with be upscaled or downscaled before the upload begins.
https://www.filepicker.com/documentation/file-ingestion/javascript-api/pick
Please check the specs and you-ll find out how to use the max_size :)
ImageMagick and RMagick both have a setting/attribute for "density", which is what they call resolution. I can pass it a value of 200 and it should set the resolution to 200x200 when the image is written to either a file or to_blob.
In the Rails console I can load the image, then set the density, and if I check it, it will tell me the density (originally 300x300) is now 200x200, but when I write it out to a file, the resolution is 300x300.
The only way I've successfully been able to change the resolution is by creating a new image of the same width and height, then overlay the original image. This, however, distorts the output, no matter what settings I use (I tried setting the original to fully opaque, the "new" to fully transparent, and even used the CopyCompositeOperation, which should fully replace the "new" image).
I have tried setting density like this:
image.density = "200"
And like this
image.write("test.jpg") {self.density="200"}
And both.
Nothing works... any ideas?
To be clear... I don't want to resize the image, I want to change the print resolution. I want the dimensions to remain the same (i.e. width/height should NOT change).
This was an issue with the version of ImageMagick that AWS has in its repositories. Removing that version and installing from source made the density setting work. Also, if you want the resolution change to be reflected in Windows applications, you need to strip the "8bim" profile from the image:
image.profile!("8bim",nil)