Database error: [Table 'gotow_ben.blog_categories' doesn't exist]
SELECT * FROM blog_categories WHERE 1=1
Database error: [Unknown column 'user_level' in 'where clause']
SELECT * FROM blog_users WHERE user_level > 0
Database error: [Table 'gotow_ben.blog_categories' doesn't exist]
SELECT DISTINCT
ID, category_id, cat_name, category_nicename, category_description, category_parent
FROM blog_categories, blog_post2cat, blog_posts
WHERE category_id = cat_ID AND post_id = ID AND post_id IN (82,79,76,73,71,69,64,60,43,40,38,33,31,28,18,16,14,13,12,11,10,8,9,7,6,5,4,3,1,2)
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/82
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/79
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/76
Great idea and good information for starting the iphone development.
thank you very much
I’ve been programming for quite a few years now and Objective C still gives me a sour taste in my mouth. I’m not sure why but everything seems so cumbersome - maybe I’m just lazy
Anyhow, good intro, thanks!
Comment by Unity 3D Tutorials — February 15, 2011 @ 2:54 am
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/73
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/71
I understand your frustration, but the way I see it $5 is not alot of money. Most ‘customers’ who spend time finding and installing pirated apps, are noe likely to be in your potential customers pool anyway.
Since I don’t have any data to back this up
I’ll apply the 80 - 20 rule.
20% are people who are in your target audience, and represent lost sales, your idea to send these guys a message is good.
80% are mindless pirates with an “I’ll install this ‘cause its free, but I can’t draw at all, and will hardly ever use the app” attitude, who would never concider paying you money for this app in the first place,
Comment by Bzzlink — August 20, 2009 @ 8:30 am
Sorry to hear that, Ben.
I haven’t installed any paint programs on my iPhone yet (illegally or otherwise), but you can look forward to a sale from me,– and not for pity, either! I’ve been in the market for a great painting app, and like a lot of people, I do as much research as I can to determine where my App Store bucks should go. Layers looks to be tops for what I want in a natural media paint program.
Found your app from John Nack’s blog. This is interesting as I do use a jailbroken iPhone (2G) as I live outside the US (phone was courtesy of my cousin who lives in NYC). The 3G and 3GS are now available and I’ll be upgrading soon (the wait list here is about 30 days). All my apps are paid and licensed so I’m just curious if jailbroken == pirated association is made in the stats.
BTW, I’ve paid up to USD18.99 for some apps
and hopefully my 3GS comes soon enough for me to get your app…
Comment by Eugene Khoo — August 23, 2009 @ 9:31 pm
Hey - I saw Layers in the App Store on my iphone, and wanted to go read more about it so I came to your site when I got to my office.
I agree with the first poster - in that those that have installed pirated copies - probably are not your target audience. Most of them are likely collectors, who won’t be using it anyway and it would not have even been on their radar had they been ‘buyers’.
I think $5 for your product is a steal, and I think the bigger issue is that so many apps have to sit at the $0.99 pricetag to get noticed, which just doesn’t seem right. I blame Sega and Super Monkey Ball! A big huge company started the App Store pricing system - and all the little guys have to live up to it. I read somewhere, someone suggested sorting apps by amount of money they’ve made, and not just the number of sales.
Anyway - I plan to be buying your App. I especially hope for some Layer Modes int he future because I see myself mainly using this for colouring ![]()
Shawn
While I haven’t bought a copy of your app yet, (need to buy an itunes card first) I find it weird that people would pirate a $5 app, I mean a meal at McD’s cost more than your app. For being a photoshop like app on the Iphone with layers and lots of brushes and the same price as Brushes, it’s defintaly a deal I would pay more(then again I bought the Adobe creative suit too) That being said I agree with the people that would pirate a $5 app probably weren’t going to buy it regardless if the pirated copy was not available. It makes me sad that people are infridging on your copyright, but I’ve learned that that’s part of creating digital content, you can try to prevent it from happening but you’ll never fully stop it from happening.
Comment by angie — September 2, 2009 @ 3:53 pm
Yes, I have to agree with the first poster, too. Those “lost” sales are certainly not all lost. A lot of people are not willing to pay $5 for an app that they are too lazy to research, so they get a free version, try it, can’t paint, and then stop using it or delete it. I have tried a ‘limited’ version of one of your competitors in the past and although I liked it I didn’t feel it was worth upgrading to the full version. I would certainly think that a ‘limited’ version of Layers would be a good idea, not withstanding the problems you have indicated.
I have now done just about all my research and I think Layers will be the one I finally go for (the ‘clincher’ being the ability to export in PSD format, layers and all!). And I WILL be buying it!
Good luck in all your efforts and thank yourself lucky you have the ability to write app’s like these. I just wish Apple would do more to put a severe strain on all the pirating so that more people like you could actually make some serious money.
Glenn
Comment by Glenn — September 19, 2009 @ 11:52 am
When I wanted to improve upon my digital painting skills (having virtually none), I thought to myself, “Lets see if there are any art apps for the Ipod!” Now doing a general search yielded no results. SO after asking around various art communities, I was given recommendations for three different apps, Layers being one of them. I bought, and tried all three apps, and by far, Layers is my favorite app to use. In fact, I’ve noticed that other apps, like Brushes, are now starting to include a layers option as well. Which is great for the users who prefer to use Brushes or aren’t even aware of Layers existence, but dont really get the best experience since some the other apps dont offer as many features that Layers does.
Anyways, I have a jailbroken Ipod, but I don’t believe that you should show your appreciation to the folks who put in the work to make and continue to improve upon their apps by stealing from them. I support all the apps that I frequently use, and if I like the free trial of an app, then I have no problems paying up $5 to own a legit copy.
Much love, Ben. Keep up the good work, and I hope that more people eventually do come to their senses and show you the proper respect by paying for this awesome app!
Comment by Christophe — September 23, 2009 @ 12:54 pm
I just got Layers for my jailbroken iPod Touch 1G. I did a lot of research in the app store and read tons of reviews, and I picked Layers because it seems like you really listen to your customers. I’m glad I paid for it (I don’t pirate apps).
The only reason I jailbroke my iPod was for additional functionality - I have a full file browser, the ability to run stuff in the background, and lots of nice tweaks. If you wanted to extend a hand to the jailbreak community and try to discourage piracy, you could always release alpha or beta versions in the Cydia Store for the same price or maybe a dollar less, in exchange for feedback. Most of the people in the community are honest about buying apps, so it’s too bad that a few have to ruin it for everyone.
Actually, the people at Infinite Labs (they make the Mover app) did just this not too long ago. Their jailbreak only version is a way for them to test out new features that might not be ready for the general public yet. =)
Great work on the app, by the way. I’m really satisfied with it overall. Like most people have been saying, an offset brush, layer filters and opacity control, and the addition of a tools palette would be great - but I can wait for that, overall it’s amazing.
Comment by Elliott — October 4, 2009 @ 2:04 pm
> you could always release alpha or beta versions in the Cydia Store for the same price or maybe a dollar less
No, you can’t. Apple would *not* like this. Their policy does not allow anyone to distribute apps outside the appstore, paid or not. So if you want to be in the appstore, it’s your only channel.
I’m new to iPhone apps and wasn’t expecting so many programs for art. I ended up buying several others too quickly and will probably end up dumping a couple that I’ve paid for. I hate to say it, but I wish I had tried pirated programs first.
I guess I was used to Macs “having fewer programs because they work". There are some apps in the iTunes store that probably shouldn’t be. So while your program is only $5, it can take $20+ to discover it. Triple that price for adding to consumer mistrust and frustration even for the good apps. I doubt many people are going to do a lot of research into $1-$5 programs.
You might want to look up non-industry studies on the “sampling effect” that have been done on other types of piracy. They validate the first poster. People collect and sample. If they use it, they want to keep it and own it.
The majority are honest by nature and that’s the opposite of what your figures say. I question using jailbroken phones can be an accurate measure for software piracy since a reason for jailbreaking is to release phones from a carrier - and other carriers will support them, “unofficially". That has nothing to do with buying or not buying software.
That kind of piracy has more to do with the fact so many devices are designed to be defective and disabled by design to prevent them from working to their capacity. It also means phones aren’t standardized, so not all programs will work with that many DIY modifications.
Another way to look at your figures would be if 1,780 were on jailbroken phones and 1,500 of those bought your software - that’s pretty good. Of course I doubt that’s what happened, but it shows relating jailbroken phones to software piracy isn’t an accurate measure.
Comment by aikanae — November 7, 2009 @ 2:49 am
Hi. I live outside of US and one year ago was impossible to buy iPhone in my country (Czech Republic). So I bought an iPhone in USA and used jailbreak for unlocking. But EVERY my apps on the iPhone I bought on AppStore.
So I’m very surprised that you automatically mark me as a thief, even if I paid your app
.
I’m software developer as well and I know how difficult is to create good software. So I pay for each application.
Comment by Fipil — January 13, 2010 @ 6:57 am
Your rates are so high because (atleast partly) YOUR DOING IT WRONG
“Each time the app is used on a jailbroken device” NO no no….
Just because a device is jailbroken DOESN’T mean it’s running a cracked version of your app!
http://www.learn-cocos2d.com/2010/05/ignore-everything-youve-heard-about-app-store-piracy/
Comment by iH4CK3R — September 14, 2010 @ 3:26 pm
I would not consider a “Jailbreaked” iPhoney to be equal with that all it’s apps are pirated.. I actually considers to root my Android x10 Mini Pro, because it turned out that Sony Ericsson are retarded and won’t upgrade the base system version (Of Android)… Well, but they seems to have fun with the multi-touch update…
I would say that the piracy is worse than you think on iTunes/Apple store, but not in a way that you can image. Someone actually bought a version of a game and uploaded it to the store as their own…
http://blog.wolfire.com/2011/02/Counterfeit-Lugaru-on-Apple-s-App-Store-developing
I thought that Apple had a very strict review process, They did not want to allow an application to stream uncensored television from the Swedish public service from the beginning…
—-
Well, this was not the reason I visited your blog, I just wanted to tell that your game “HexDefense Free” Crashes alot on my phone. If it hadn’t crashed that much I would already have bought the full version.
Comment by Frank Eriksson — March 6, 2011 @ 6:18 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/69
Well put, exactly my feelings. The state of affairs is definitely sad to say the least. Nice apps, tho. I will be purchasing when I get home!
Yeah - I hear yah! I hate browsing through the App Store trying to find something relevant to my tastes.
I agree. I wish that someone would man-up and clean up this mess.
Comment by Vlad — November 22, 2011 @ 2:24 am
WOW, George, really?
There will be no supply, if the is no demand, man. And, you are creating demand.
Ben, maybe you should consider blacking out the app names that way you don’t inadvertently advertise them.
Comment by Vlad — November 22, 2011 @ 2:28 am
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/64
This is the best code ever seen. Only problem I had to copy the code. The line numbers come along. ![]()
I wish it was a whole project.
Thank you for code.
Agha
Comment by Agha — July 26, 2009 @ 3:28 am
Hey,
that’s really a great function, but I run into trouble somehow…
I just need the rotateImage method. So what I do is calling this one:
image = [self rotateImage:image byOrientationFlag:originalOrientation];
to override the image with the right image. If I do this, my UIImageView which gets this image afterwards displays nothing. It’s just transparent. Where as if I return img; at the end of your function everything is displayed (just the wrong way of course), so it seems to be something wrong with the newly generated image. Do you have any ideas to that?
Thanks, Michael
Comment by Michael — August 12, 2009 @ 8:43 am
When I realised I had this problem, I didn’t have a spare 5 hours to come up with a solution myself so thank you so much for clearing the path for me. It’s a great piece of code and it does exactly what I needed it to.
One problem I had was that the photos saved to the screen were always mirrored along the x or y axis (depending on the original orientation). I had to fix it by transforming the UIImageView I was displaying. Is the mirroring expected behaviour? Would there be a nicer way to correct it within the code above as opposed to my UIImageView hack?
Comment by Rich — September 10, 2009 @ 9:01 pm
You rock, dude. Always keep that in mind.
Comment by Ricardo Garriota — September 16, 2009 @ 12:28 pm
Thanks for the information. I’m dealing with some orientation issues in the old Image Capture framework on the Mac. (It doesn’t automatically rotate the thumbnail for an item.) Have you ever seen an image in the wild that used a mirrored orientation?
Thanks a milion for the sample images!!
Comment by Gabriel — October 6, 2009 @ 8:22 am
Hey Ben, this is great. I recently found your site when I had to solve a subset of this problem. Because my solution is specific to the selection rect and it’s transformation, I wrote some code for transforming the rect using CGRectApplyAffineTransform. And I can fully sympathize with your rant!
Here’s my post:
http://niftybean.com/main/blog/16-selecting-regions-from-rotated-exif-images-on-iphone
Also I found different correspondences between EXIF orientation codes and UIImageOrientationXXXX enum values. When I ran my tests, UIImageOrientationLeft = EXIF code #8, and UIImageOrientationRight = EXIF code #6.
Comment by Robert Clark — October 11, 2009 @ 5:28 pm
[…] EXIF Orientation Flags and the iPhone Camera […]
Comment by Resize a UIImage the right way — Trevor’s Bike Shed — October 13, 2009 @ 2:09 am
Thank you very much for the sample code. I struggled with a solution for this myself, but yours is cleaner.
I also had issues with the images getting released before I could use them. I wasn’t dealing with cropping, so I just kept the rotate code.
My iPhone always rotates the picutres to the right, not sure why. In order to get them perfectly aligned I had to change the code like this or they were off the top by a bit.
if ((orient == UIImageOrientationDown) || (orient == UIImageOrientationRight) || (orient == UIImageOrientationUp)){
// flip the coordinate space upside down
CGContextScaleCTM(context, 1, -1);
CGContextTranslateCTM(context, 0, -width);
}
I changed -height to -width.
Rob
Comment by Rob Bruce — January 22, 2010 @ 11:24 am
Hi Ben!
Thank you for this great code. I enhanced the image orientation handling for all possible values of UIImageOrientation:
Here’s my post:
http://www.mrh-line.de/Micha/Web_Log/Entries/2010/4/14_Exif_orientation_in_iPhone_SDK.html
Comment by Michael Haller — April 14, 2010 @ 11:04 am
Only took 5 hours to figure it out…You are genius!!
Comment by Wei — April 21, 2010 @ 10:12 pm
Fixed a bug:
case UIImageOrientationRight: //EXIF = 8
161. boundHeight = bounds.size.height;
162. bounds.size.height = bounds.size.width;
163. bounds.size.width = boundHeight;
164. transform = CGAffineTransformMakeTranslation(0.0, imageSize.width);
165. transform = CGAffineTransformRotate(transform, 3.0 * M_PI / 2.0);
166. break;
Should use imageSize.height in the translation part, not imageSize.width.
Comment by Jody McAdams — August 28, 2010 @ 12:54 pm
Thankz man, the rotateImage method worked for me and helps me a lot.
Regards
Comment by Rafael — September 23, 2010 @ 8:52 am
Great post, it’s helped me out a lot. I was wondering if you could give me a couple of pointers…I’ve spent the last day battling how to get cropping working. I have a camera overlay, and all I’m trying to do is take a small square crop from underneath the finger on camera press and save it. My overlay view is aligned perfectly with the camera view, but the cropped area never matches the finger press….I’m using your algorithm for UIViewOrientation calculation. I can’t for the life of me figure out where I’m going wrong.
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
//figure out the scale between the image and the screen
//is it possible that my problem comes from the fact that the
//screen and the image are different width/height ratios?
CGFloat scaleX = image.size.width / SCREEN_WIDTH;
CGFloat scaleY = image.size.height / SCREEN_HEIGHT;
//get the relative x/y locations on the image, back by the size I want to crop out
CGFloat x = (overlayViewController.lastTouch.x * scaleX) - (CROP_WIDTH/2.0);
CGFloat y = (overlayViewController.lastTouch.y * scaleY) - (CROP_WIDTH/2.0);
CGRect cropArea = CGRectMake(x, y, CROP_WIDTH, CROP_WIDTH);
//use cropArea in your algorithm to crop
//save the images
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil);
UIImageWriteToSavedPhotosAlbum(croppedImage, nil, nil, nil);
I have a sneaking suspicion that the reason my crop area doesn’t match the image is because they’re different ratios of width/height (iphone 1.5, image 1.33)….but I’m not sure. Is there a better way to do this (basically crop a small rectangle around the touch area?)
Cheers
Adam
Comment by Adam — October 6, 2010 @ 3:19 pm
Followup - yeah, I’m pretty sure the issue is transposing the 3:2 coordinates system onto the 4:3 scaled up image. I could always transform/scale the image, but as your article points out, this is slow and clunky…pity there’s no library to transform a CGRect to a new aspect ratio, seems like something that many people would want to do with the increase in aug reality apps.
Do you know any resources to elaborate on this, I’ve tried to come up with the math myself by I keep missing the mark (been a long time since I’ve done any math! Maybe just getting old).
Cheers
Adam
Comment by Adam — October 6, 2010 @ 5:03 pm
This is the best code.
When i meet this problem few weeks ago, i had fixed it go with the option1 as you mention, but i found it will spent more time to rotate the large image(1600x1200), as my application requirement, i do not need so large image, so i scaled it and rotated, it works.
Now i found your solution, i will check and change my code, since it is better choice to give larger image to user.
Thanks!
Comment by bygreencn — October 11, 2010 @ 1:08 am
Thanks a million! Saved me a lot of time. It’s ludicrous that we should have to do this ourselves. Whatever happened to WYSIWYG?
Comment by Tony — November 5, 2010 @ 10:45 pm
Searched all over the web trying to figure this out. Your code is fantastic! Thanks very much for posting this. It’s helped me out a ton!
Comment by fredwardo — November 5, 2011 @ 1:02 pm
Nice work, this did the trick for my app!
Comment by Josh — December 12, 2011 @ 11:30 am
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/60
Dude this is sick.
Comment by Hamy — July 7, 2009 @ 12:56 pm
Does this work on SL? I’ve tried running it, but it stalled on the initial fetch. Could you release the source by any chance? I’m also a bit of a StackOverflow addict and would love to be running it.
Comment by Nick Ludlam — September 8, 2009 @ 6:05 am
Wow, this is great! Thank you very much!
Comment by Martin Labuschin — December 4, 2009 @ 12:25 pm
This is really awesome! It could use a smaller status icon though. Some of us have LOTS of icons there ,)
Open Source it on gitHub or Google and I’m sure you’d get help with improvements… I’d help.
Comment by Steve — July 26, 2010 @ 8:40 am
You should add a method to close the application.
Also, this program did not function for me. Im sure its something small, Hope to see improvements.
Comment by Jason M — April 19, 2011 @ 5:51 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/43
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/40
You’re looking for GCC_PREPROCESSOR_DEFINITIONS. Add this under the User-Defined section. The definition should be like: DEBUG=1 FLARTMODE=2
Comment by Steve Weller — April 20, 2009 @ 12:37 pm
You’re mistaking build settings for compiler flags. It’s as if you thought that setting FOO = BAR in a makefile would be passed to the compiler automatically.
There are a bunch of build settings. Many translate directly to compiler flags, but most do other things in the build system. There is one specific build setting (in the UI, it’s cryptically titled “Preprocessor Macros") that sets the initial value for preprocessor macros. And there’s another one (in the UI, also mysteriously called “Other C Flags") that lets you send any arbitrary flag to the compiler.
There are some pretty active forums on Apple’s devforums.apple.com boards, on the xcode-users@lists.apple.com mailing list, and on Stack Overflow where basic questions like this can be answered pretty quickly without banging your head against a wall.
Comment by Chris Espinosa — June 17, 2009 @ 2:10 am
Hey Chris,
Thanks for the help! I’ll have to clean up this post tomorrow. For some reason I had a hard time finding the documentation for XCode. Reading through the docs, I was definitely confused about the difference between build settings and compiler flags. Thanks for pointing me in the right direction - I’ll definitely look to StackOverflow or the mailing list next time something like this comes up. The “Preprocessor Macros” and “Other C Flags” in the UI make sense, but they’re pretty easy to gloss over!
Hi ,
I want to add a compiler flag to my application
is other cflags is the proper place to do that
also it contain
-DNS_BLOCK_ASSERTIONS=1 , how to add another one , and what does this line mean
any suggestion please
Comment by Ali — January 27, 2011 @ 5:54 am
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/38
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/33
Pretty much exactly what I was looking for. Thanks mate! Sorted that one out for me!
Comment by Alzum — March 11, 2009 @ 1:02 pm
Yep! Worked for me, thanks!
Comment by Marco — May 6, 2010 @ 8:31 am
Should bitmapData be free()’d if the context can’t be created?
Comment by Hendrix — September 29, 2010 @ 10:55 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/31
Thanks! The checkbox images are very nice looking. They will make my life much easier.
Comment by paul — May 18, 2009 @ 2:29 pm
Yes, I found you can set up the checkbox as a custom button in Interface Builder and use only a few lines of code to get it to work. Have a look at my tutorial and source code: http://weheartgames.com/2009/06/simple-iphone-checkbox/
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/28
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/18
I think your app is good enough. I am student and thank you for the low price of this app. And SpaceTime i had downloaded in cracked version ![]()
Sorry for my english.
Comment by He3eMHoi — January 11, 2009 @ 5:07 am
Ben, people do appreciate your good work:
http://stclairsoft.com/blog/2009/01/23/mathomatic-for-iphone/
You are helping needy people, like I do.
Those that already have everything will always whine and want more.
Regards,
George
Comment by George Gesslein II — February 2, 2009 @ 7:56 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/16
hi
qha36k8gud8gp1md
good luck
Comment by Candace Sawyer — January 9, 2009 @ 9:14 am
Nice work.
Thanks Ben.
Comment by Jean — March 14, 2009 @ 2:50 pm
Really nice, i´ve been looking for something like this along time, but I need some help to implement some webview in a tabbar application with the same navigation. The problem is that I make a tabbarcontroller and I don´t know how to show the webview with the navigationbar. I´ve tried several methods but no solution. Could anybody help me whith this problem??
Thanks
Hello, thanks a lot for posting the example I found it very helpful and went and bough the NetSketch app. I’m newer than new at this… I’m trying to make a little app for my band and I was wondering how I can make it start from the webview, in other words instead of having a tableview with a list of urls that then shows a webpage, I’d like to start with a webpage ( maybe with the UIWebview) and retain the same functionality as in your example from that point on. same as the example minus the tableview at the start. Thanks a lot for your help!
This is great but I have one question - How could I load a local html file contained within the app?
Comment by Mike — June 13, 2009 @ 10:25 am
Hey Mike,
I think you can get the absolute path to a file and provide it as the base url in the DrillDownWebController’s init function. For example, let’s say you had a file that was stored at ~/Documents/index.html relative your app. You should be able to say:
NSString * path = @"~/Documents/index.html";
NSString * absolutePath = [NSString stringByExpandingTildeInPath: path];
and then pass absolutePath to the controller. If that doesn’t work, you could try appending the “file://” url handler to the front of the string. I don’t think that should be necessary, though. Also, you can use the NSBundle to get the relative path to files in your app if you don’t know them offhand (for instance if you drag the html file into XCode and build, it’s put inside your bundle).
Hope that helps!
- Ben
Thanks for the hints ben,
I tried your suggestions with the paths & in RootViewController.m I changed as follows:
- (void)viewDidLoad
{
pageURLs = [[NSArray alloc] initWithObjects:
@"http://www.gotow.net/creative/content_blog/drilldowncontroller/example/",
@"index.html", // My local File
nil];
pageTitles = [[NSArray alloc] initWithObjects:
@"Basic Usage",
@"Local File",
nil];
}
However no luck loading the local html.
Comment by Mike — June 18, 2009 @ 8:05 am
I like it! How would you suggest making a Navigation Bar direct to another Navigation Bar when clicked (sometimes, but othertimes open a web page)?
Comment by Lee Smith — July 19, 2009 @ 3:40 pm
I have been trying to get this to work with local html files also.
I was thinking that the following line in DrillDownWebController.m would need to be changed:
[p setRequest: [NSURLRequest requestWithURL: [NSURL URLWithString: [p actionURL]]]];
To something like :
[p setRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] ]]]];
and then change the RootViewController.m to:
pageURLs = [[NSArray alloc] initWithObjects:@"your folder/your page",@"your folder/your page",nil];
still cant get this to show local pages. Any help would be greatly appreciated.
Comment by John — August 22, 2009 @ 10:39 pm
I got it to show local pages after changing URLWithString to fileURLWithPath in DrillDownWebController.m and commenting out…
/*if (![[[[r URL] absoluteString] substringToIndex:4] isEqualToString:@"http"]){
[container handleNonHTTPRequest: r];
return NO;
}*/
…in the shouldStartLoadWithRequest method of DrillDownPage.m
Comment by tkirby — September 26, 2009 @ 8:48 pm
Thanks so much for sharing. This is very useful for creating hybrid apps which have drill down web capabilities combined with conventional view controller logic…
Helped me out!
Comment by Greacher — December 2, 2009 @ 12:17 am
Is there anyway to just load a html page?
I would like to get rid of the table thing.
Comment by Russell — February 4, 2010 @ 4:37 am
That’s great sample code
Thanks Ben!
Hi
Im developing the application,where i will show my WebView(login screen) in the viewcontroller,when the user fills the details and login i have to take the action to my app by getting the username and the hav to close that login screen and take over to my app.can you guide me in this..
Thanks
Comment by siva — June 16, 2010 @ 8:40 am
Hi
Nice sample you have given.but i need the action that perform from the submit button as you made when the user clicks on to the Alink .can any one help me out in this..
Thanks in advance..
Comment by sivasankarp — July 5, 2010 @ 12:40 am
I have a setup in InterfaceBuilder where I have a TabBarController which has NavigationBarControllers and then views under there so that each view on the TabBar has a NavigationBar. If one of the Tabs is a DDWebViewController and is located within the More tab, it seems to remove the main NavigationBar after switching to another view within the More tab from the DDWebViewController. Any ideas on how to make this work with all these Tab bars and nevigation controllers?
Thanks
Comment by Jeremy — July 14, 2010 @ 8:39 pm
My question is essentially the same as Nova’s above. I would like to do almost exactly what this example does, except I want the first view to be a webview. I don’t need the uitableview at all. I tried cutting out the tableview bits and replacing them with webview bits, but then my links never trigger the sliding animation or update the nav controller.
Any advice on how I can accomplish that would be greatly appreciated.
Comment by Mike — September 28, 2010 @ 1:25 pm
Hi Jeremy, I need held, I try to add a tab bar, but I don’t find the solution.
Can you hellp me ?
Local caching of the loaded pages would be an amazing feature, so that they are reloaded immediately.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/14
Many thanks for this trick. Your timing was perfect as I just ran into this issue yesterday and remembered your article here and was able to deal with it and keep on rockin. Thanks from a fellow Nashville iPhone developer!
Comment by Stephen Tallent — November 21, 2008 @ 11:37 am
Thanks for the tip, it solved my problem!
Comment by Stephan Burlot — February 17, 2009 @ 5:11 pm
This works great in OS 2.x, but, speaking theoretically, Apple _could_ release an update to UIWebView that might not fail in the same way when loadRequest:nil is called…in which case didLoadWithFailure will not be called and the webView will not be released.
Comment by Dan Weston — April 21, 2009 @ 4:17 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/13
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/12
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/11
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/10
This looks like a fantastic program, but is there any such version that’s available just for regular computers? Collaborative drawing software is REALLY hard to come by, and the fact NetSketch is vector-based is impressive.
Comment by Roxie — August 8, 2008 @ 2:13 am
Hey Roxie,
SubEthaEdit (http://www.codingmonkeys.de/subethaedit/) allows you to do collaborative text editing, and I played around with it a lot while writing NetSketch. Unfortunately, I don’t know of anything that does collaborative drawing on the desktop. The closest thing to NetSketch is an app for the Nintendo DS
. Let me know if you find one, though. I’d be interested to see it!
- Ben
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/8
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/9
Your app looks great and seems interesting. But with no trial version on iTunes I’m reluctant (cheap) to drop six dollars on something that I’m not sure I’ll enjoy for 6 hours. If it was a dollar I would probably purchase it and try it out without a trial.
Regardless, I’m glad you are getting 50-odd sales a day however - congratulations.
Comment by hfwm — October 8, 2008 @ 3:44 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/7
nice
Comment by appreciative — January 7, 2009 @ 2:36 pm
Nice function. Here is a simplified version, which avoids all bitPerRows computing and memory management, plus preserves the original image format (transparency for example).
+ (CGImageRef)resizeCGImage:(CGImageRef)image toWidth:(int)width andHeight:(int)height {
// create context, keeping original image properties
CGColorSpaceRef colorspace = CGImageGetColorSpace(image);
CGContextRef context = CGBitmapContextCreate(NULL, width, height,
CGImageGetBitsPerComponent(image),
CGImageGetBytesPerRow(image),
colorspace,
CGImageGetAlphaInfo(image));
CGColorSpaceRelease(colorspace);
if(context == NULL)
return nil;
// draw image to context (resizing it)
CGContextDrawImage(context, CGRectMake(0, 0, width, height), image);
// extract resulting image from context
CGImageRef imgRef = CGBitmapContextCreateImage(context);
CGContextRelease(context);
return imgRef;
}
Thanks a ton!
Comment by Gothgod — May 4, 2009 @ 2:20 pm
Just in case anyone would like to know:
Yves solution works well if you scale a PNG image, but won’t work If you scale a jpeg image, then you have to use the original version. Don’t know why and haven’t looked into it.
Comment by Gothgod — May 30, 2009 @ 6:17 am
@GOTHGOD
You may be able to modify this code to work on a JPG image as well. It assumes that the image has 4 channels including an alpha channel. If your CGImage came from a JPG, it doesn’t have an alpha channel. I should update this code sample to check the number of channels in the input image! Thanks for the heads up,
- Ben
i’m also looking for image scale, and i found a site says
“Remember to release the return CGImageRef with CGImageRelease() manually!”
so is that the necessary for the function like that?
refer url:
http://www.ultie.com/archives/19
Comment by eric — June 25, 2009 @ 7:54 am
Hey Eric,
You are correct - after you call the function and get a CGImageRef back, you need to release it manually. The problem is - Core Foundation classes like CGImage don’t have any notion of autorelease. Normally, if your function created a new object, you’d autorelease it before returning it and then it would be the responsibility of the calling code to retain it if it was needed.
Technically, the function above should be named “createScaledCGImageFromCGImage” to indicate that it’s returning a new (retained) instance of a CGImage. I’ve fixed it in the post. Thanks!
Note that one of the reasons this routine might fail is if the color space is indexed (CGBitmapContextCreate doesn’t handle them). When I implemented this code and I came across an indexed color space, my code blew up OUTSIDE this routine when releasing the UIImage associated with the passed in CGImageRef, so I had to check for an indexed color space and exit BEFORE trying to create the context:
if (CGColorSpaceGetModel(colorspace) == kCGColorSpaceModelIndexed) {
CGColorSpaceRelease(colorspace);
free(bitmapData);
return nil;
}
I’m not clear why trying to create a context with the indexed color space wreaks havoc with my UIImage release, but rather than try to figure it out, I just slipped in the code above…
Note the call to:
CGColorSpaceRelease(colorspace);
is incorrect, as it was obtained by a getter only - so you shouldn’t release it. This causes a memory bug that manifests itself when using this method multiple times. You either need to call CFRetain or not release it.
Thanks.
Comment by MrP — March 11, 2011 @ 2:23 am
MPR is right. The colorspace obtained through a Get method must not be released. Your code does not have the ownership of the object in this case.
Also, if there is an error in creating the context, the routine will quit in the middle. There will be a memory leak, because the bitmapData will not be freed.
Here is the correct handling:
if (context != NULL)
{
CGContextDrawImage(context, CGRectMake(0 , 0, width, height), image);
CGImageRef imgRef = CGBitmapContextCreateImage(context);
CGContextRelease(context);
}
free(bitmapData);
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/6
Yay for getting your app up! Boo for cafepress.
Post some pics of the Zazzle shirts when you get them.
Comment by Doggums — July 19, 2008 @ 10:14 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/5
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/4
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/3
is it code for winnowing algorithm in plagiarism detecting???
Comment by luthar — March 1, 2011 @ 3:13 am
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/1
Hi, this is a comment.To delete a comment, just log in and view the post's comments. There you will have the option to edit or delete them.
Comment by Mr WordPress — December 29, 2007 @ 12:28 pm
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
RSS feed for comments on this post.
The URI to TrackBack this entry is: http://www.gotow.net/creative/wordpress/wp-trackback.php/2
No comments yet.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
0.230 Powered by Wordpress
Hi Ben,
Glad to see that you’re taking Layers to other platforms.
Comment by Keni — January 22, 2010 @ 1:34 pm
Nice article ! Unfortunately, you’re not understanding the problem in the correct way. Actually, Android is not compressing graphic resources at all. The problem comes from the fact most (I think all for now
) Android devices are based on a display that uses a 16-bits color palette to render colors. As a result, you get banding effects with simple gradient.
I’ve wrote an article dealing with that problem (http://android.cyrilmottier.com/?p=196) : it’s in French but I’m sure Google Translate will help you
.
Good luck and welcome to the Android world !
Comment by Cyril Mottier — February 2, 2010 @ 12:13 pm
Android fail haha
Comment by lailai — April 6, 2010 @ 7:00 am
You might want to try inserting images into the res/raw/ directory.
http://developer.android.com/guide/topics/graphics/2d-graphics.html
Comment by Jay — May 19, 2010 @ 10:56 am
Hi! I’m just getting into Android development, and I happened to run across your article yesterday. This morning I read about something that may provide a better solution to this problem. The following “Note” comes from this page:
http://developer.android.com/guide/topics/graphics/2d-graphics.html
Note: Image resources placed in res/drawable/ may be automatically optimized with lossless image compression by the aapt tool. For example, a true-color PNG that does not require more than 256 colors may be converted to an 8-bit PNG with a color palette. This will result in an image of equal quality but which requires less memory. So be aware that the image binaries placed in this directory can change during the build. If you plan on reading an image as a bit stream in order to convert it to a bitmap, put your images in the res/raw/ folder instead, where they will not be optimized.
I guess the noise they suggested to add is probably chromatic noise, which would expand the palette beyond the 256 colors eligible for 8-bit compression, meaning it probably won’t be recompressed at all. But if you don’t mind the hassle of reading the image as a bit stream, you can prevent the recompression without altering the image. I have not tried this, but it looks promising. I hope it helps!
Comment by Andrew Lundin — August 30, 2010 @ 10:42 am
[…] app ‘Layers’ for the iPhony have at least attempted to try to create an Android version : PNG compression in Android… (You have got to be kidding) I have found that I ran into the very same problem that this guy was having with the Android OS - […]
Comment by Any artists using painting/animation apps here ? - Android Forums — September 4, 2010 @ 1:04 am
Hey,
The real solution is here for in apps :
http://stuffthathappens.com/blog/2010/06/04/android-color-banding/
Tried it just now on my app and it works like a charm except I had to put it in the oncreate and not in the attachedwindow.
Comment by Yahel — November 15, 2010 @ 11:48 am
Cyril is absolutely correct. This is neither Android-specific (the iPhone is 6-6-6 so 18 bits of color all in all) nor does the dithering stop any “optimiziations". Most smart phone displays can only display 16 bits of color. Newer smartphones can show more but still like to use a color depth of 16 bits because it saves memory and cpu. You can tell the window manager to go to 24 or 32 bits if you want to, but your bitmaps will (obviously) need more ram.
Comment by Kevin — November 20, 2010 @ 11:45 am
You can just set
getWindow().setFormat(PixelFormat.RGBA_8888);
before setting the contentView in an activity…solved!
Comment by dori — March 21, 2011 @ 12:20 pm
I suggest using the excellent program DamageControl. The program applies dithering to images, and can support dithering to 16 colors. Though new warned that if you resale the images on the device before displaying the image you will likely loose the careful dithering created by Damage Control and banding will reappear.
Comment by Alex Berg — March 27, 2011 @ 11:59 am
I found a great trick for my game. I use the drawable-no-dpi folder.
This way, nothing happens to my graphics.
I use photoshop only now and create plenty of nice 9 patch PNGs.
Feel free to drop by and grab them on my blog:
android9patch.blogspot.com
Free to use for any apps, including commercial.
They can be editing with photoshop or the android 9 patch tool.
Comment by Richard Lalancette — September 2, 2011 @ 12:10 pm
I found a great trick for my game. I use the drawable-no-dpi folder.
This way, nothing happens to my graphics.
I use photoshop only now and create plenty of nice 9 patch PNGs.
Feel free to drop by and grab them on my blog:
android9patch.blogspot.com
Comment by Richard Lalancette — September 2, 2011 @ 12:10 pm
@Richard - Minor correction: the name of the folder needs to be “drawable-nodpi” (you had an extra “-").
BTW, thanks for sharing your 9-patch files - some good stuff there.
Comment by Dwayne — September 30, 2011 @ 1:01 pm
We’re having a slightly different problem… there’s no banding, but the colours are appearing completely wrong. We’re trying to get a sandy coloured png to appear, but it turns blue on android :/ and we can’t seem to find any fix for it, or even anyone with the same problem.
Comment by Kat — February 25, 2012 @ 7:55 pm