HomepageLog inSign upSite MapPasser en français  
Search
Sdl's Egosystem
s t e p h a n e d e l u c a . c o m


مصطفی الجوّال

Lite Edition, Year 2014
Vol. 21, Thu. Jul. 31st, 2014 13:27
M C M L X X X I I :   T H I R T Y - T W O   Y E A R S   O F   P R O G R A M M I N G   A N D   T E C H N O L O G Y   D E S I G N 
BLOG
Home
Curriculum Vitæ
Résumé
Blog
IPHONE® & IPAD® DEVELOPMENT
LeKiosque™: First 3D Newsstand For IPad®
MaryChard™: Hiperf 3D & Collada
SdlImage™: 3D Graphics Booster
MOBILE/TELCOS
Mobile Web: 35M Pages/month
Mobile Earth
Mobile MMO
Wireless Multiplayer
VIDEO GAMES INDUSTRY
Nightmare Creatures 3 (Ubisoft)
Nightmare Creatures 2 (Konami)
Commando (Namco)
Angel Quest (GT Interactive)
Storm (Electronic Arts)
Asterix & Books (Canal Plus)
CONSULTING
Consulting & M&A
Business
3D NEWSSTAND
SINCE 2010
MOBILE WEB
2009
CONSULTING M&A
2007
MOBILE EARTH
2006
MOBILE MMO
2005
WIRELESS MULTIPLAYER
2004
VIDEO GAMES INDUSTRY
1994-2003
BEFORE
<1994

MCMVXXXII: THIRTY-TWO YEARS OF PROGRAMMING AND TECHNOLOGY DESIGN


iOS: compute the aspect fit rectangle of an image within a given rectangular container

May 18th, 2013 22:18 by sdelucaPermalink | TrackBack: http://stephanedeluca.com/trackback/892 — exists for a year & 2 months ago

I seldom give code snippet. But it must be recognized that simple geometrical operations are not really understood by most of programmers. As a consequence, they often come up with long and complex source code which is even not solid, bugs being around.

The objective is to compute the bounding rectangle of an image which is placed in a given rectangular container, so that the image is stretched to fit into it, keeping the original image aspect ratio.

In addition, the code center the image within the bounding view.

The first step is to compute the two possible scale factor. As we're looking for the maximum constraint, we pick the smaller scale factor to decide what direction to keep. Then we recompute the second direction by combining the two scale factors.

The resulting code is short, as follows:

- (CGRect) getAspectFitRectangle:(UIImageView *)iv
                           image:(UIImage *)im {
    // view to embed the image
    float vw = iv.frame.size.width;
    float vh = iv.frame.size.height;

    // image to be embeded in the view
    float w = im.size.width;
    float h = im.size.height;

    // compute
    float scaleW = vw/w;
    float scaleH = vh/h;

    if (scaleW>scaleH) {
        // keep height, recompute width
        float iw = vw/scaleW*scaleH;
        // compute horizontal translation
        // to center the image
        float x = (vw-iw)*.5f;
        return CGRectMake(x,0, iw,vh);
    }
    else {
        // keep width, recompute height
        float ih = vh/scaleH*scaleW;
        // compute vertical translation
        // to center the image
        float y = (vh-ih)*.5f;
        return CGRectMake(0,y, vw,ih);
    }
}




Nietzsche told us, or the raise and the fall of the digital skeumorphism paradigm

Mar. 24th, 2013 10:26 by sdelucaPermalink | TrackBack: http://stephanedeluca.com/trackback/891 — updated on Mar. 28th, 2013 10:12 exists for a year & 4 months ago

Skeumorphic approach to digital user interface was Steve Jobs' favorite direction, though rising passionated debates at Apple, internally.

Spiritual Jobs' son, Scott Forstall, continued in this direction after the death of Jobs, but his most prominent contradictor was Jonathan Ive, who, eventually, took over Scott's responsabilities making Scott resigning from Apple.

We now see the first public evidence of the reorientation to the Ive's take on flat design originally initiated by Microsoft Windows 8 Modern UI approach to user interface ringing the knell of digital skeumorphism.

See how Apple Podcasts application on iOS just droped it's skuemorphic skin:

1 Legend : on the left, new flat design, on the right, former skeumorphic design

Bye bye idealism, welcome nihilism: Nietzsche told us about all this, long ago.

Digital world is eaten by physical world: impossibility now becomes impossible. Even there.




LEKIOSQUE.FR: IT'S WINDOWS TIME

Mar. 10th, 2013 13:19 by sdelucaPermalink | TrackBack: http://stephanedeluca.com/trackback/890 — exists for a year & 4 months ago

Welcome 2013!

Spring is at only days away, and the surprise won't come from iOS this time.

Sun makes a warm breeze enter by the windows this time.

I am proud to introduces a brand new version of the 3D newsstand, running Microsoft Surface tablets and any PC running Windows 8.

The app v1.0 is currently in submission status, but I let you stare at the first ever screenshots…




LEKIOSQUE.FR: THE MISSING XMAS 2012

Dec. 31st, 2012 20:30 by sdelucaPermalink | TrackBack: http://stephanedeluca.com/trackback/889 — updated on Mar. 10th, 2013 13:37 exists for a year & 6 months ago

End of 2012 is very weird here. We prepared a very nice brand new version v1.9.8 with tons of features and improvement plus a gorgeous new xmas brand new theme, but alas, you won't have it!

We struggle with Apple in order to make them validate our app, but they bloc it for some reasons. And frankly, we won't pass through this year. See you next year anyway, with a solution.

Happy new stand 2013!




LEKIOSQUE.FR: CIAO ITALIA !

Oct. 23rd, 2012 09:07 by sdelucaPermalink | TrackBack: http://stephanedeluca.com/trackback/888 — exists for a year & 9 months ago

I am happy to introduce the new v1.9.6 version which gives access to our users to more than 150 italian magazines.

In addition, lekiosk is also given a new italian theme for you to enjoy!




   
« It's amazing to see how much value one can create with a simple computer: Microsoft, Google, to cite a few…
But it requires so much involvement that few people even dare to try.
So, what are you waiting for? »



Sunny Cloudy Rainy Stormy

Last additions and updates:

  1. iOS: compute the aspect fit rectangle of an image within a given rectangular container updated on May 18th, 2013 22:40
  2. Nietzsche told us, or the raise and the fall of the digital skeumorphism paradigm updated on Mar. 28th, 2013 10:12
  3. LEKIOSQUE.FR: IT'S WINDOWS TIME updated on Mar. 10th, 2013 21:55
  4. LEKIOSQUE.FR: THE MISSING XMAS 2012 updated on Mar. 10th, 2013 13:37
  5. LEKIOSQUE.FR: IT'S TIME TO SUPPORT THE iPHONE updated on Mar. 9th, 2013 15:09
  6. LEKIOSQUE.FR: INTRODUCING 2D NEWSSTAND updated on Mar. 9th, 2013 14:48
  7. LEKIOSQUE.FR: HAPPY NEW YEAR 2011 updated on Mar. 9th, 2013 14:47
  8. LEKIOSQUE.FR: WOW EFFECT & SIMPLICITY PAY OFF — WORLDWIDE FIRST 3D NEWSSTAND STICKS AS THE #1 GROSSING APP updated on Mar. 9th, 2013 14:45


Our life as a programmer will never be the same.

June. 1st, 2006 20:47 by sdelucaPermalink | TrackBack: http://stephanedeluca.com/trackback/340 — updated on Mar. 21st, 2008 21:51 exists for 8 years & 2 months ago

Our life as a programmer will never be same.

Remembering twenty-four years ago -- back in 1982 -- the first time I get in touch with what I will call a computer; it was a Texas Instrument TI-57, a calculator equipped with a simple numeric display and a maximum of 50 programmable instructions. It was right after xmas, at school, a friend of mine showed me the calculator, saying something like: "look at that!" and while pressing a strange "RUN" key, the TI to display this incredible thing: 9, 8, 7, 6, 5, 4, 3, 2 and 1! This automatic count down somewhat blew up my brain!

This event triggered the beginning of my interest in computing at-large. But at that time, I was miles away to imagine from what one could achieve, years after years. And even the most anticipating fiction never matched what actually appeared years afters.

My first mobile phone was purchased in 1996, ten years ago; I was then completing my first PC, Saturn and PlayStation project in Paris. The handset was small enough to make people in the streets stop by and stare at me when I was passing a call.
I understood at that time that one day, people would use their mobile phone to play, connected each others to a gigantic MMO game via the air. But I thought it would take tens of years to come up.

Once again, things arrived more rapidly than expected: only ten years after, the industry is about to reach 1 billion of new handsets sold this year. How it comes? Innovation. Building new markets thanks to new products or technologies.

That's fine.

But what's really cool, is that I am in the place trying to push the envelope one step further, participating to this course, spreading new ideas or usages. New technologies.

But what could be new technologies if they are not streamlined enough and not really made for casual users? While the world of the mobile industry was already fast paced, there wasn't that much innovation since the appearing of 3G/3G+ network. Same ideas were simply recycling again and again.

By chance, the promising 3 billion users market definitively attracted new entrants. Once again, Apple came up with a great design along with well defined features with its iPhone, and simply redefined almost everything in the industry. Amazing.

But how does this is likely change our programmer's life? Well, where others simply put Java ME (90% of the market) or Symbian (5%) or even Windows Mobile on their devices, Apple did choose not to sacrifice the performance and homogeneity; they simply embedded their own system - Leopard - and did provide the Xcode environment. But more importantly, they came up with an unique and incredible simple distribution scheme: developers choose the price for their app, and Apple take care of everything via iTunes - distribution and payment - for a mere 30% of the revenu.

Nice!

Sdl, Paris

Written in June 2006, last updated in march 2008.




Copyright © 1994 ˜ 2014 dsei.biz / Stéphane de Luca — All Rights Reserved | 01:27 PM RSS RSS Feed  | Best viewed with Apple logo Safari