w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Rotate UIImageView just like in the Photos.app
I don't understand what you mean with the photo app, but there are not too many ways to rotate a view. Basically there are 2 ways: the first way would be to apply a CGTransformation like in the following example: UIImageView *imgView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; [imgView setImage:[UIImage imageNamed:@"polaroid_spacer"]]; [self addSubview: imgView]; [UIView animateWithDuration:0.3f delay:5.f options:UIViewAnimationOptionCurveEaseIn animations:^{ [imgView setTransform:CGAffineTransformMakeRotation(M_PI_2)]; } completion:NULL]; The other way would be to apply a CATransform to the view's layer: //be sure to include quartz #import <QuartzCore/QuartzCore.h> UIImageView *imgView = [[UIImageView alloc]

Categories : IOS

How to rotate a UICollectionView similar to the photos app and keep the current view centered?
I struggled with this for quite a while, until I at least found this 'cosmetic workaround': Add a full screen UIImageView with the current image (and correct auto layout constraints set) on top of the collectionView during rotation. Like so: -(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration: (NSTimeInterval)duration { [self.collectionView.collectionViewLayout invalidateLayout]; // show a UIImageView with the current image on top of the collectionView // to cover the ugly animation self.imageViewOnTopOfCollectionView.image = [self imageForItemAtIndexPath:self.currentIndexPath]; self.imageViewOnTopOfCollectionView.hidden = NO; // show a centered, very large 'fakeBackground' view on top of // the UICollectionView, bu

Categories : IOS

Save photos to AWS S3 from iphone app
I would advise that you relay the image to the server which uploads it to S3 for you. You will need to have this happen synchronously so that the app knows it is ready to share. It is important because S3 location or credentials may change and you do not want to be forced to update the app if this happens. Yes, the server now becomes the S3 client, and returns the result of S3 update into your API return to the iPhone client.

Categories : Iphone

Android: save a large number of photos from url
Consider using Universal Image Loader In my application i load more than 300 photos and i don't get outOfMemoryException error however the library needs to draw some cache. Here's the project on GitHub: https://github.com/thest1/LazyList

Categories : Android

How to only save new tweets/instagram photos to database?
Twitter provides the 'created_at' value, giving you a date and time the tweet was created. Each time your cron job runs, store the date and time, then on the next run, only upload the tweet if the date/time is prior to the value of 'created_at'. I'm not too familiar with Instagram, sorry - but I assume the same logic would apply. ["created_at":"Wed Aug 27 13:08:45 +0000 2008"][1]

Categories : PHP

How to save photos to phones library/album?
This function will serve your purpose. It is for saving the image in library. UIImageWriteToSavedPhotosAlbum(UIImage *image, id completionTarget, SEL completionSelector, void *contextInfo); Example: UIImage* imageToSave = [imageView image]; // alternatively, imageView.image // Save it to the camera roll / saved photo album UIImageWriteToSavedPhotosAlbum(imageToSave, nil, nil, nil);

Categories : IOS

Grails Optimum way to save users avatar photos and show them in GSP?
If they're just small avatars, you could consider persisting them to your database. When you need to display them again you can fetch them from the db and write them to the response's outputstream. Here's an example of how to do this: http://grails.1312388.n4.nabble.com/Load-image-from-database-and-show-it-in-a-gsp-td4644393.html

Categories : Image

php rotate and save image - not doing anything?
the problem is in the imagejpg function. it shoul be, like this: header('Content-type: image/jpeg'); imagejpeg($rotate); chek imagerotate manual link EDIT the problem, is that you are showing the image in the browser and algo another text, thats is why you get that "strange text", try to save the image whith: imagejpeg($rotate, "test.jpeg"); and remove the header('Content-type: image/jpeg');

Categories : PHP

Rotate persp3d plot and save images as png
x=1:10 y=1:10 z=matrix(runif(100),10,10) persp3d(x,y,z,theta=50,phi=25) then loop over theta or phi, use view3d to set the angle, snapshot3d to make a PNG theta = seq(0,360,len=10) for(i in 1:10){ snapshot3d(file=paste0("spin-",i,".png")) view3d(theta=theta[i]) } You might want to loop over phi instead of theta. Anyway, that gets you the PNGs you want, doesn't it?

Categories : R

Missing photos when retrieving Users tagged photos facebook-graph API
The only thing that comes to mind is the settings of each user since according to the answer posted here - facebook graph api - missing fields, API access to these things can be turned off at the user's discretion.

Categories : Facebook

How can I show last saved photo in Photos app iOS via "photos-redirect:" URL scheme?
photos-redirect:// is the URL Scheme for Photo App. However, it is undocumented, thus you shouldn't use it. To view / select a photo, use UIImagePickerController .

Categories : IOS

Android - scale, rotate and save a bitmap to sdcard without losing quality
use this method to rotate the bitmap... private Bitmap checkifImageRotated() { ExifInterface exif; try { exif = new ExifInterface(file.getAbsolutePath()); int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL); int rotate = 0; switch (orientation) { case ExifInterface.ORIENTATION_ROTATE_270 : rotate = -90; break; case ExifInterface.ORIENTATION_ROTATE_180 : rotate = 180; break; case ExifInterface.ORIENTATION_ROTATE_90 : rotate = 90; break; } if (rotate != 0) { Bitmap bitmap = BitmapFactory.decodeFile(getTempFile().getPath()); Matrix

Categories : Android

KinectJS: Rotate an image about an absolute rotate point per drag and drop
You can move an image around a fixed rotation point using some trigonometry Calculate the angle of the mouse position relative to the rotation point using Math.atan2: var dx=mouseX-rotationPointX; var dy=mouseY-rotationPointY; var radianAngle=Math.atan2(dy,dx); Move the image around the rotationPoint using Math.cos and Math.sin: var x=rotationPointX+radius*Math.cos(radianAngle)-imgWidth/2; var y=rotationPointY+radius*Math.sin(radianAngle)-imgHeight/2; image.setPosition(x,y); Here's working example code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Prototype</title> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script src="http://d3lp1msu

Categories : Javascript

Chrome cannot apply filter:hue-rotate() and transform:rotate() at the same time in an animation
I took a stab in the dark and created two key-frame animations and then declared both for the element, which is working in Chrome 28: http://jsfiddle.net/3QGWY/1/ #subject { ... -webkit-animation:5s multi_rotate1 linear infinite,5s multi_rotate2 linear infinite; } @-webkit-keyframes multi_rotate1 { 0% { -webkit-filter:hue-rotate(0deg); } 100% { -webkit-filter:hue-rotate(360deg); } } @-webkit-keyframes multi_rotate2 { 0% { -webkit-transform:rotate(0deg); } 100% { -webkit-transform:rotate(360deg); } }

Categories : CSS

css transform:rotate, rotate forwards not backwards
I have choose to do that using a class for the rotation and another for the transition. And to make it easier in the script, using 2 divs nested so that you have only one class in each. The HTMl <div id="pie" class="rotate"> <div id="pos" class="rot0"> <div class="rot0" onclick="myFunction(0)">1</div> <div class="rot6" onclick="myFunction(1)">2</div> <div class="rot5" onclick="myFunction(2)">3</div> <div class="rot4" onclick="myFunction(3)">4</div> <div class="rot3" onclick="myFunction(4)">5</div> <div class="rot2" onclick="myFunction(5)">6</div> <div class="rot1" onclick="myFunction(6)">7</div> The CSS #pie { width: 200px; height: 200px; left: 35px; top: 35px; position: absolute; backgrou

Categories : CSS

android animated-rotate won't rotate ccw
I think the point is if you use <animated-rotate> it is a non public API. I can't find any official documentation about it. and it is actually ignoring whatever values you put in fromDegrees and toDegrees. You can remove both attributes and it will still spin. You said you don't want to use rotate, but that is the only other simple XML answer I can find: <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@android:drawable/ic_lock_power_off" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0" android:toDegrees="-360" /> What is the reason for wanting <animated-rotate> and not <rotate> ? If you want to set a slower or faster frame count, you should check this answer here: http://stackoverflow.com/a/1499

Categories : Android

Is it even possible to tag photos in Facebook?
You must get Photo ID firs and then tag someone on this photo upload photo to album $photo_details = array( 'message' => $message, 'access_token' => $token ); $photo_details['image'] = '@' . realpath($file); $uploaded_photo = $facebook->api('/'.$album_uid.'/photos', 'post', $photo_details); Get Photo ID $photo_id = $uploaded_photo['id']; set Friend ID you want to tag $tags = array( array('tag_uid' => $friend_id, 'x' => rand() % 100, 'y' => rand() % 100 ) ); tag friend $facebook->api('/'.$photo_id.'/tags', 'post', array('tags'=>$tags)); It works for me, I hope this will help you

Categories : PHP

photos are disappearing in the Like box
the new embedded-post-plugin could be the reason why they dropped the image support... https://developers.facebook.com/docs/plugins/embedded-posts/ btw, there are a lot of questions like this since july 2013. i've also contacted online magazines like t3n.de, and they have no idea why facebook is/was not reacting to it.

Categories : HTML

Google+ API to get all the photos
There is currently no Google+ Photos API. The best you can do at this point is to use the Picasa Web API. For more information, see https://developers.google.com/picasa-web/

Categories : Javascript

Convert JsonObject to Photos
I guess if you can get the binary source, then in your JSP for loop have an img tag whhere the src in a servlet, passing it your unique id. This servlet will then stream back the bytes. <c:forEach items="${photosList}" var="photo"> //I want to retrieve the src from the photosList <img src='myservlet?pid=${photo.pid}'> </c:forEach>

Categories : Java

How Can I Use the Keyboard to Scroll Photos
Off the top of my head, make a list of the top offsets of each image, and then when pressing the down/up arrows, compare the scrollTop position to the image positions to determine which one is closest in the up/down direction. var locs = []; // Save offsets of each image // Use a better selector in real life $('img').each(function () { locs.push($(this).offset().top); }); $(document).keydown(function (e) { switch (e.which) { case 37: case 38: case 83: // Get the current scroll position var sTop = parseInt($(document).scrollTop()); // For UP, go through the list backward until // you find one before the current scroll position for (i = locs.length-1; i >= 0; i--) { if (locs[i

Categories : Javascript

Photos optimize and cache
My tips: resize them directly after uploading in the desired resolutions, as you do now; rendering them on-the-fly all the time eats up a lot of CPU. cache: store them as regular files in your webdirectory, say in /images; your webserver can then serve them directly. Create a 2-level subdirectory structure to prevent a huge number of files in one directory. I suggestion taking the MD5 hash from the original file, then use the first 2x2 bytes as subdirectories, the rest as filename. E.g. the md5sum of the file is 4ad5ec63e6c771a4f1c91e4d19bdf921 and you want to render 3 resolutions (small, medium, large). The (resized) files on disk are then named: /images/4a/d5/ec63e6c771a4f1c91e4d19bdf921_s.jpg /images/4a/d5/ec63e6c771a4f1c91e4d19bdf921_m.jpg /images/4a/d5/ec63e6c771a4f1c91e4d19bdf92

Categories : PHP

Android API for Google+ Photos
I finally found all the pieces for that I need. The end result is to use AccountManager to get the auth token and PicasawebService to do the rest. Though there are some annoying bug with adapting the class. I wrote up my little adventure here along with example code. http://roostertech.wordpress.com/2013/08/09/accessing-gphoto-android/

Categories : Java

How to get correct photos path?
Instead of using UIImageWriteToSavedPhotosAlbum, you can use UIImagePNGRepresentation or UIImageJPEGRepresentation to get an NSData object you can apply directly to the WX stuff, no need to go through the file system and back.

Categories : IOS

Get block value of saved photos
You are mixing and matching synchronous and asynchronous methodologies. There are two possible approaches. Make the return of your photoCount method asynchronous by passing a completion block. - (void)PhotoCount:(void(^)(NSUInteger))completionBlock { ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init]; __block NSInteger result = 0; void (^assetGroupEnumerator)(ALAssetsGroup *, BOOL *) = ^(ALAssetsGroup *group, BOOL *stop){ if(group != nil) { if([[group valueForProperty:ALAssetPropertyType] isEqualToString:ALAssetTypePhoto]) { result += [group numberOfAssets]; } } else { // nil group signals we're done with enumeration if (completionBlock) { completionBlock(result);

Categories : IOS

How can set a script to run after all photos have loaded?
It seems to me that the http POST call retrieves the photos. And I am suppose that myScript is a function. So why not try this: var photos = { name: 'photos', url: '/photos', views: { main: { templateUrl: "views/photos/photos.html", controller: function($scope,$http){ $http({ url: 'get/photos', method: "POST" }) .success(function (data, status, headers, config) { $scope.data = data; myScript(); }) .error(function (data, status, headers, config) { $scope.status = status; }); } } } }; since the myScript function only runs after

Categories : Angularjs

Refreshing annotations mix photos
There are two major problems here. First you're reusing a pinView but not setting the attributes according to the annotation that it is trying to draw. You're correct to dequeue a reusable annotationView, but if you reuse one or don't you will always need to set the image to the one you want to draw right now otherwise the pinView's image will be the one that it was previously. e.g. if ([annotation isKindOfClass:[CustomerMarker class]]) { MKAnnotationView *pinView = nil;//Create a new handle, don't risk having one global one static NSString *customerMarkerPinID = @"com.idm.customer"; pinView = (MKAnnotationView*)[mapView dequeueReusableAnnotationViewWithIdentifier:customerMarkerPinID]; if (!pinView) { pinView = [[MKAnnotationView alloc] initWithAnnotation:anno

Categories : IOS

ALAssetsLibrary Get Photos At Location
It seems like you are looking for a spatial index of some sort. Look here in the "Spatial Index" section for a list of possibilities: http://en.wikipedia.org/wiki/Spatial_database.

Categories : IOS

IOS: Get NSData from Photos path
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@",URLImages]]; NSLog(@"%@",url); NSData *data = [[NSData alloc]initWithContentsOfURL:url]; UIImage * img=[UIImage imageWithData:data]; ImgView.image=img; try this one..

Categories : Iphone

Styling photos in slideshow
Just add overflow hidden #slideshow > div { ... overflow:hidden; ... } Fiddle Update As per OP request "" first you need to change your img tag to a div <div id="slideshow"> <div> <div class="imgLike" style="background-image: url('http://farm6.static.flickr.com/5224/5658667829_2bb7d42a9c_m.jpg'); background-position:center; "></div> </div> </div> <div> <div class="imgLike" style="background-image: url('http://farm6.static.flickr.com/5230/5638093881_a791e4f819_m.jpg'); background-position:center; "></div> </div> <div> <div class="imgLike" style="background-image: url('http://gillespaquette.ca/images/stack-icon.png'); background-position:center; "></div> &l

Categories : Jquery

Like box not showing photos anymore
This is "by design". The limited space of social plugins like the Like Box and Activity Feed means FB has to display 'compact' versions of large stories like photos. If you look at the CSS, you'll see the DIVs are tagged '!important' (not important).

Categories : Facebook

How to select multiple photos?
...there is ELCImagePickerController which allows multiple images selection example // Create the image picker ELCImagePickerController *imagePicker = [[ELCImagePickerController alloc] initImagePicker]; imagePicker.maximumImagesCount = 4; //Set the maximum number of images to select, defaults to 4 imagePicker.returnsOriginalImage = NO; //Only return the fullScreenImage, not the fullResolutionImage imagePicker.imagePickerDelegate = self; //Present modally [self presentViewController:elcPicker animated:YES completion:nil]; // Release if not using ARC [imagePicker release]; Code can be found here!

Categories : C#

What is a way to get a user's photos from Facebook (iOS)?
Simply fetch the data through this url: http://graph.facebook.com/philiparpin/picture Replace philiparpin (my name) with the name of the user you want to get the photo of. Resource: http://developers.facebook.com/docs/api

Categories : IOS

Get all photos of a page using Facebook API
When you get your Facebook user, you can: get the list of all its albums get the user's profile picture get the photos the user (or friend) is tagged in They respectively need those permissions: user_photos or friends_photos not needed user_photos or friends_photos UPDATE: If you want to get those information from a Facebook page: Photos - The Page's uploaded photos. Albums - The photo albums the Page has uploaded. Permissions are: any valid access_token or user access_token

Categories : Facebook

Facebook Like Box - photos does not appearing
In your script for the lightbox, change show_faces=false to show_faces=true. And for the other images, make sure the source is correct. Facebook uses background images in the stylesheets where the url goes to a third server and the image names since to be hashes. Check the image source in your script and make sure it does not change in your site. So far, I did not see any image location in your script for your photos.

Categories : Facebook

get a random set of photos using instagram API
There is no Instagram endpoint that supports a random parameter, at least one that is documented. You would need to retrieve several media objects and select a random set on your end. Maybe you could mix things up a little using max and min timestamps.

Categories : Jquery

How to get photos from a facebook page
You can get the user pages using- "/me/accounts" Then for any PAGE you can query following using the page access token which you received from the above call- "/PAGE_ID/photos"

Categories : Facebook

Uploading photos to Instagram via your own iOS app
What you are trying to do is implemented through the Instagram API http://instagram.com/developer/. You can also use the Instagram App to do some similar actions. These are documented under iPhone Hooks. If you are using Ruby Motion, then you will be able to use the official framework. Unfortunately, there is no officially supported Objective-C iOS API but some open source alternatives are available, like the NRGramKit. The exact way of implementing the interaction with the Instagram API is beyond a Stack Overflow answer but the links above should give you a good starting point if you are familiar with iOS programming.

Categories : IOS

Responsive Circle-cropped photos
The answer ended up being vw/vh. http://css-tricks.com/viewport-sized-typography/ If I made the circle-dimensions percentage-based, the circles would turn into ellipses, unless the height of the container were equal to the width of the container, which is almost never the case (an 80% x 80% circle in a 100px x 200px container is actually 80px by 160px). The trick was to make the circle diameter a function of the container/window width alone, by using the vw unit. That way, the image resized with the window, without distorting into ovals.

Categories : HTML

Get all photos the user is tagged in on Facebook
On-picture tags are not the same as tags in the description (post). There are three FQL tables to get the content where a user has been tagged: photo_tag to get tags on photos, stream_tag to get tags on posts, video_tag to get tags on videos. You used the first one but you also need the second one. Similarly to your photo tags request, you will then have to use the stream table.

Categories : Facebook



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.