You have searched the archives for 'apple'.

Link to micropost

Portal + iPhone 4S Siri

Published by stelabouras - No comments

Μπορεί το Siri, ο personal assistant του iPhone 4S, να καταλαβαίνει τι λέτε και να απαντάει ανάλογα, δεν θα ήταν όμως καλύτερα να απαντάει όπως η GlaDOS από το Portal; Το παρακάτω video δείχνει πως θα μπορούσε να ήταν το promotional video του Siri αν σε αυτό προταγωνιστούσε η κυνική GlaDOS! Read more

iOS function to create a path’s outline

Published by Petrakeas in Software - 2 comments

Screen-shot-2011-09-12-at-11

Υου’ll wonder why is that useful… Well for a number of reasons and for creating the shadowPath of a path!
If you want to render some paths with their shadow, you can set the CALayer‘s properties:

mycalayer.shadowOpacity = 0.8;

But if you don’t specify a shadowPath, the layer’s alpha channel will be used which is slow for real time changes. The solution is to specify a CGpath as the shadowPath. But apple doesn’t give you a function that creates a shadowPath around your path. So… I’ve written one!

The function accepts an open or closed  CGpath and the desirable width for the outline and returns the outline as a closed CGpath. It uses the Acclerate Framework for faster calculations.

I have created a demo that animates the outline’s width as well as the rotation of a path. The outline of one of the paths is used as a shadowPath. You can find the function inside this demo project here: https://github.com/Petrakeas/outlineDEMO

A video of the demo follows and some technical details.

UPDATE: I have added some more functions that help in the creation of bezier curves and updated the demo accordingly. Read the post here.

Fastest way to draw shadows and blend layers in iOS

Published by Petrakeas in Software - 1 comment

Screen-shot-2011-09-02-at-6

And by fastest I mean performance wise. Right now I’m working on an application that has to perform custom drawing (bezier curves) in real time and I am trying to achieve an oscilloscope look. That’s why at first I tried to do everything using Core Graphics functions (mainly CGContext functions) inside a custom drawRect function in my custom UIView. Core Graphics is very powerful and you can almost do what Photoshop does, in a programmatic way. The downside is that many functions are quite slow because they don’t use hardware acceleration.

For example, I first loaded the background of my oscilloscope inside a custom drawRect using Core Graphics and then painted curves on it using some interesting blending modes. I figured that it was quite faster to have the background on a separate UIView and just draw the curves on my custom UIView (which was on top of the other). This is due to the fact that layer compositing (CALayers and UIviews) uses hardware acceleration. On the other hand, when the background image was rendered using Core Graphics it caused heavy use of CGSBlendRGBA8888toRGBA8888 as Instruments showed.

Another way to blend layers and images is to use CGLayers but they are also slow due to the same reason. So, the fastest way to blend layers and images is to place them in separate CALayers or UIViews (you might prefer using CALayers to UIViews when user won’t be able to interact with the object). The disadvantage of this method  is that you can only blend them the normal way (you can’t use color dodge blend mode for example).

Secondly, I wanted to achieve a glow effect, so I decided to use shadow with a bright color. At first I used CGContextSetShadowWithColor on the layer of my curves. It proved to be very slow and the CPU usage increased proportionally to the amount of blur. This was caused by the fact that the shadow is implemented using a correlation function. As a result I decided to try the same with the shadow function of the CALayer of my UIView (self.layer.shadowRadius=8; … ). I was surprised to see that it almost had no impact on the performance even for bigger pixel radius! I am not sure but maybe this shadow function is hardware accelerated or has a more optimized implementation.

To sum up, iOS has a lot of graphics frameworks, some of which are just wrappers for the low level ones and others have completely different implementation. Unfortunately you have to learn the hard way in order to find the one who suits you right. For example when I used UIGraphicsGetCurrentContext inside the init function of my UIView  to initialize a CGLayer, the CGContext at that point was not intended for a display. The result was that this CGLayer was not on graphics memory and the rendering was very slow. So, I had to initialize it inside drawrect! This is just an example of how the performance of your application can vary from small changes…

UPDATE: for even faster shadows (for paths) create a shadowpath. Read more here.

UPDATE2: I added some functions to create bezier curves easily. Read the post here.

iTunes alternatives

Published by Petrakeas in Multimedia, Software - No comments

Screen-shot-2011-08-02-at-4

Αν είστε σαν και μένα και χρησιμοποιείται mac αλλά σιχαίνεστε το iTunes μέσα από τα βάθη της ψυχής σας, τότε σας έχω μία (δύο βασικά) λύσεις.

Το Songbird είναι ένας open source multi platform audio player που μοιάζει πολύ με το winamp. Μπορεί να κάνει monitor τους φακέλους της μουσικής σας και να τους προσθέτει στη βιβλιοθήκη του, μπορεί απλά να παίξει ένα αρχείο ήχου, έχει “now playing” list ώστε να φτιάξετε μια πρόχειρη λίστα με τα κομμάτια που σκοπεύετε άμεσα να ακούσετε και έχει έντονο web integration. Δηλαδή έχει shoutcast για να ακούτε internet radio, Last.fm support ώστε να ενημερώνεται το τελευταίο για τη μουσική που ακούτε στο songbird αλλά και για να μπορείτε να ακούσετε Last.fm μέσα από το songbird. Δυστυχώς το τελευταίο δεν το κατάφερα ακριβώς. Συγκεκριμένα, έκανα να παίξει ένα radio του Last.fm μέσα από τη σελίδα του που είχε ανοίξει σε tab μέσα στο songbird αλλά δεν ήταν το ίδιο το songbird που streamαρε τη μουσική. Κάτι που ξέχασα να πω είναι ότι το songbird είναι απίστευτα όμορφο. Είναι τόσο sexy το design που το αφήνω ανοιχτό απλά για να το χαζεύω ακόμα και αν δεν παίζει κάποιο κομμάτι!

Ένας άλλος “audio player” είναι το Neutrino. Βασικά δεν είναι απλά audio player, αλλά περισσότερο DJ εργαλείο με interface που μπορεί να χρησιμοποιήσει κάποιος απλά για να βάλει ένα mp3 να παίζει, αλλά μέχρι και για να βάλει εφέ στον ήχο, να δει την κυματομορφή του κομματιού και να θαυμάσει πανέμορφα visualizations. Καταρχήν το Neutrino χρησιμοποιεί audio units και την επικοινωνία με την κάρτα ήχου και αυτό τα λέει όλα. Audio units είναι το προγραμματιστικό interface της apple το οποίο προσφέρεται για είσοδο, έξοδο και εξεργασία ήχου σε πραγματικό χρόνο. Το χρησιμοποιούν κορυφαία προγράμματα όπως Logic και Final Cut Pro. Το Neutrino είναι συμβατό με εξωτερικά Audio Units plugins, δηλαδή μπορείτε να χρησιμοποιήσετε plugins που δέχεται το Logic και να ορίσετε τη σειρά που θα τοποθετηθούν. Επίσης για τα visualizations χρησιμοποιεί quartz compositions της apple. Οπότε είτε μπορείτε να φτιάξετε τα δικά σας, είτε να κατεβάσετε μερικά. Να σημειώσω εδώ ότι δεν είναι free το πρόγραμμα αλλά μπορείτε να το δοκιμάσετε για ένα μήνα.
Read more

Macbook και electroshock

Published by Petrakeas in Hardware - 6 comments

How-to-Properly-Wrap-Your-Macbook-Power-Cord

Έχω έναν Macbook pro του 2010 Q2, οποίος έρχεται με 2 βύσματα για τον φορτιστή. Ένα με 2 pins και ένα με 3 pins μαζί με γείωση. Όταν συνδέω το πρώτο και φορτίζει, νιώθω μια μικρή δόνηση στο aluminum case του Μacbook όταν κουνάω γρήγορα το χέρι πάνω του. Το πιο ενοχλητικό όμως, που συμβαίνει σπάνια, είναι ένα μικρό “ηλεκτρικο σοκ” που νιώθω στο δεξί μου χέρι όταν ακουμπάει στην κάτω δεξιά γωνία του macbook κοντά στο DVD. Απ’ ό,τι έψαξα αυτό είναι αρκετά συχνό φαινόμενο στους Μacbook με aluminum case και είναι ένα ακόμα παράδειγμα που δείχνει ότι η Apple βάζει πολύ πιο πάνω το design από τη σωστή υλοποίηση (π.χ. σπάσιμο καλωδίων USB, κεραία στο iPhone 4).

Ένα ακόμα μειονέκτημα του aluminium case είναι ότι είναι πολύ καλός αγωγός της θερμότητας και η default ρύθμιση της Apple για την ταχύτητα των ανεμιστήρων είναι πολύ αργή, οπότε υπερθερμαίνεται σε σημείο που να μπορείτε να πάθετε έγκαυμα αν το βάλετε πάνω στα πόδια σας. Τέλος, λόγω του αλουμινίου (το οποίο δεν επιτρέπει ηλεκτρομαγνητική ακτινοβολία να περνάει από μέσα του), το μοναδικό σημείο επικοινωνίας επικοινωνίας του Μacbook με τον έξω κόσμο (WiFi, Bluetooth) είναι η μάυρη πλαστική στύλη κάτω από την οθόνη, οπότε όταν όταν το σήμα του WiFi είναι ασθενές πρέπει να το στοχεύεις προς το access point!

Μία λύση για τη ρύθμιση της ταχύτητας των ανεμιστήρων είναι το fan control. Σχετικά με το ηλεκτροσοκ δυστυχώς θα σταματήσω να χρησιμοποιώ το βύσμα με τα 2 pins πράγμα που σημαίνει ότι θα πρέπει να κουβαλαώ το μεγάλο καλώδιο με τα 3 pins. Προσωπικά, θα προτιμούσα η Apple να δίνει μεγαλύτερη σημασία σε τέτοια θέμετα παρά πχ στην ταχύτητα με την οποία αναβοσβήνει το led του Macbook όταν είναι σε sleep mode…

Link to micropost

Η κονσόλα της Apple;

Published by stelabouras - 1 comment

Δείτε το παρακάτω video και θα καταλάβετε πως η Apple κυκλοφόρησε μια game console κάτω από την μύτη της Microsoft και της Sony. Το όνομα της; iPad 2! Με δυνατότητα για 1080p video out, A5 processor, touch controls και μια πληθώρα τίτλων στο ενεργητικό του, το iPad 2 φαίνεται πως έχει πλέον σοβαρούς λόγους να διεκδικεί μια θέση στο σαλόνι κάθε gamer!

Read more

Link to micropost

iPad 2, ή αλλιώς … iPad!

Published by stelabouras - No comments

iPad 2 = Δύο κάμερες στην μπροστινή και πίσω όψη, A5  dual core chip, γυροσκόπιο, βελτιωμένες επιδόσεις στα γραφικά, 1080p video out, 33% πιο λεπτό και 15% πιο ελαφρύ από τον προκάτοχό του, ίδια τιμή και μπαταρία και “έξυπνα” covers. Αν και δεν ακόμη δεν βλέπω λόγο να το αντικαταστήσω με το original iPad, δεν πιστεύω πως κάποιος θα μπορούσε να ζητήσει περισσότερα από ένα product update!

Link to micropost

Τα νέα MacBook Pros

Published by stelabouras - No comments

Ανανεωμένα specs για τους φορητούς της Apple, αλλά με έναν νέο άσσο στο μανίκι: Thunder…thunder…thunderbolt! Τεχνολογία από την Intel που υπόσχεται ένα unified port για όλες τις ανάγκες (external drives, video capture, tv output) με ταχύτητες που φτάνουν τα 10Gbps per channel, με two channel support (daisy chained) και backwards compatibility με το Mini DisplayPort πρότυπο. Sounds awesome!

Google, Facebook, Twitter και…Obama στο ίδιο τραπέζι

Published by stelabouras in Internet - No comments

5455525432_13440e52f8_b

Να και κάτι που δεν βλέπεις συχνά. Αν και είναι άγνωστο σε τι ακριβώς εύχονται, το όχι-και-τόσο-μυστικό δείπνο της παραπάνω φωτογραφίας είναι γεμάτο από γνωστά ονόματα.

Obama, Jobs (Apple), Zuckerberg (Facebook), Schmidt (Google), Costolo (Twitter) και Bartz (Yahoo!) μαζί με άλλα εννιά ισχυρά άτομα του web business τομέα της Αμερικής κάθισαν στο ίδιο τραπέζι ως “μέρος του διαλόγου (της κυβέρνησης) με τις επιχειρήσεις, πάνω στην συνεργασία για το μέλλον, την ενίσχυση της οικονομίας και των εξαγωγών και την επιστροφή των Αμερικάνων στον εργασιακό τομέα”.

Προσωπικά θα προτιμούσα μια σύνθεση ala “The Last Supper” του da Vinci.

Link to micropost

Apple Water

Published by ispofacto - 1 comment

Αν θέλετε να αγοράσετε ένα διαφορετικό είδους νερού, που είναι… Apple branded, τώρα πια υπάρχει λύση. Σαφώς η τιμή θα είναι ανάλογη!

Scifi movies για το 2011

Published by stelabouras in Cinema, Videos - No comments

super8

Ένα είναι σίγουρο: Από τον Μάρτιο μέχρι τον Ιούλιο θα δούμε αρκετές scifi movies, ελπίζω μόνο να αξίζουν!

Παρακάτω ακολουθούν τα trailers από τις ταινίες X-Men: First Class, Thor, Pirates of the Caribbean: On Stranger Tides, Captain America: The First Avenger, Super 8, Transformers: Dark of the Moon, Cowboys and Aliens, Battle: Los Angeles και bonus η Limitless που είχε ωραίο trailer.

Σημείωση: Τα παρακάτω trailers (εκτός από το X-Men) έπαιξαν στα πλαίσια του Super Bowl.