How can I set a name to a camera photo and save it to disc? - rubymotion

I am building an iOS app using Rubymotion.
In this app I want to let the user take a picture and cache/save it to the
disc. The important thing is that I will be able to find it later explicitly.
How can I save camera photos to the app?
How can I select a custom name for the image?
Thankful for all input!

I would look into two methods within the ALAssetsLibrary class:
- writeImageToSavedPhotosAlbum:metadata:completionBlock:
- assetForURL:resultBlock:failureBlock:
The first will allow you save a UIImage to the Saved Photos Album, returning its assetURL if successful.
The second will allow you to look up an ALAsset by its assetURL.
As for custom names, you'll have to store those within your app along with the assetURL of the image.

Related

How to display image here

Hi there, how can i display image here(its example place on the photo but it will be nice if i can put image here) from field Image but not after saving but live(when i paste url then display preview). I dont have any idea how to do that so the last thing is to write a question here.
Looks like you should use custom admin templates, then use JavaScript

django wysiyg editor image control

Is there a django wysiyg editor I can control its image?
I want to set a default image size and use the image as a thumbnail as well.
all wysiyg contents are represent like {{content}} since in model it's set like
content=some Wysiyg field()
The one I want to do is {{content.image}} and play around with that image.
Is there any way I can do that? right now this is the one I'm using, but I'm willing to change to the one I can control image with.
try django-ckeditor, redactor it's more simple but redactor itself isn't free and i think ckeditor is more flexible in the configuration

Sitecore place multiple images from library at once

Working on a project for a client. They have a PDF that has been broken into separate pages as images, and they want to have each of those images appear on a single page - at least 40 images for this one page alone.
So far, I've just been placing them individually. Each time you go to place an image using the rich editor, you start at the media root - and the way the media library has been structured, these images are buried very deep within subfolders. So it takes about 20 seconds of clicking, scrolling, and reading to find each image to place it.
These images are sequential and placed in order in the media library. Is there a way I can select a group of images and just drop them in? There are going to be literally hundreds of these, and it's a huge waste of my (and my client's) time placing images one-by-one.
Going along the lines of what TwentyGotoTen has said, I would:
Structure your images in the Media Library within folders (if you haven't already done so)
Create a sublayout/xsl rendering that contains a repeater to render the images
Add the control to the layout and set the DataSource of that control to the Media Folder
The code should then retrieve all child items from that folder and render as necessary.
You may need the use of the Sublayout Parameter Helper to access the datasource from ascx codebehind.
I'm assuming you just want the images to appear one after the other with nothing else inbetween. Rather than embedding images in rich-text perhaps you should consider creating a multilist field for the images in the template and create a rendering / sublayout to render them.
You can set a more suitable source for the multilist than the media root. This should make it a lot easier to select the images.
Mark van Aalst has created a custom image field that allows to do this a bit easier as well.
Have a read through this. This is also available on Sitecore's Marketplace: Multiple Images Selector
It will allow you to select your images through a multilist field, but it'll show the images as an image field with multiple images.
I think this is pretty much the solution TwentyGotoTen is talking about as well, but shows the thumbnail of the selected images as well.

Criteria for User Generated Photos

The requirement for using the User Generated Photo action property is documented as:
"The User Generated Photos action property can only be used if the photos are original and taken by a user with an actual camera."
Is there any guidance available as to how strictly this is to be enforced?
Would a mobile app have to disable the selection of an image from the phone's gallery (as we cannot be sure that the selected image in this case is original or indeed a camera photograph)
What level of processing of the photograph is acceptable? I presume filters and frames are OK. How about overlaid text or other graphics? How about generating a larger image with the original photo as a smaller part of it?
You should let the user upload what they want, but just make it clear in your Terms and Conditions what the requirements for a photo are. Filters, cropping, etc should be fine and the photo will still be original.
You should put in place a moderation tool so you can easily delete / hide photos that don't comply with the Terms (i.e. in an admin section), and allow users to 'report' images. It's extra work but it means you have overall control of the photos that user's upload.

Adding Template Select and Image upload to custom post in Wordpress

I have become a bit confused on the best way to move forward with something I'd like to achieve in Wordpress. My problem is partly workflow I think and knowing the correct way to do what I'd like to achieve but also there may be a few blanks on how to actually implement some of what I need to do. I have checked various online resources but they all are specific to what they are doing and I can't easily understand them to apply them in to the context of my own project, which is why I wanted to ask here. I'm sure my initial question will inevitably branch out to sub questions but here we go:
For my website I have created a custom post type called 'projects'. I have successfully set this up.
Then for each project I need to allow the following data to be entered:
Project Title
Project Description
Also post meta data that will display as a list on each project page (I'll need to display both the key and value on the page but only for those fields that contain data 'i.e. I don't want the list to show as Location: blank'):
Client Name:
Location:
Project Value:
Architect:
Engineer:
Site Area:
My main question is this, I need to show images for each project and allow the user to select a 'template' for each project post, this is because there are about 5 grid designs for layout of the images (1 main Image, 1 square image with two small images right side, 3 portrait image cols etc).
I thought the correct way would be to create a custom post type called projects, add write panels to allow easy input of data (I've yet to add image uploads as this will need to vary depending on the template selected and number of images required), at data input stage the user selects the preferred image layout/template and then uploads images for the containers that allow images (I’ll need to id each image upload to position it in the template with CSS, that was the plan).
Firstly, am I approaching this correctly? And secondly, how can I add functionality to the write panel I have created to allow users to a) select a 'Template' (bit like you can with pages but for my custom post type) and b) to add image upload fields which change depending on the template selected?
Finally, I would like to stay away from using plug-ins and try and achieve this myself through functions.php etc. This is to avoid problems later as plugins update or lose support etc.
Any help is appreciated, thank you.
This sort of question seems to come up a lot in regards to Wordpress (I answered essentially the same question the other day). I know you want to avoid plugins but this sounds like a job for Advanced Custom Fields.
You can create exactly the fields you need for your custom post type (including an image upload field), and then add them into the template the corresponds with your custom post type.
ACF does have a 'lite mode' which can be included directly in a theme. This way you needn't worry about updates nuking site functionality. Believe me you will save yourself a lot of time and energy this way.
It's admirable to try and do it with pure WP, but it's a maturing platform, it just doesn't lend itself to this sort of customization easily.