Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-17-2011, 11:57 AM   #1 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 2
phdlove42 is on a distinguished road
Thumbs down How to modify images

Hey all,

I am attempting to make a kind of slider puzzle app and have found a few samples out there but I would like to learn how to make this not just paste some code. I have figured out how to select images from my own photos and get it to display to a UIImageView but that is where I am stuck. I understand that a way to do it would be using CGrect but that is confusing me as well.

specifically:
I would like to take an image, and slice it into at least 9 movable squares. Any help is appreciated even if its a link or a sample way to slice an image even once.

THANK YOU ALL.
phdlove42 is offline   Reply With Quote
Old 07-17-2011, 05:57 PM   #2 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

You could use CGImageCreateWithImageInRect to get the nine separate pieces and create separate UIImages from it.
baja_yu is offline   Reply With Quote
Old 07-17-2011, 06:03 PM   #3 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 2
phdlove42 is on a distinguished road
Default

Quote:
Originally Posted by baja_yu View Post
You could use CGImageCreateWithImageInRect to get the nine separate pieces and create separate UIImages from it.
BRILLIANT. Kinda sad I missed that going through that earlier but that sounds great. When I use that does it actually create those images or are they references? My concern is that if I am trying to have them move when you try and solve the puzzle that they could lose whatever data is stored in them.

Valid concern?

Thanks again.
phdlove42 is offline   Reply With Quote
Old 07-17-2011, 06:14 PM   #4 (permalink)
Reading the Documentation
 
baja_yu's Avatar
 
Join Date: Sep 2010
Location: 45.255019,19.844908
Posts: 5,414
baja_yu has a spectacular aura about
Default

I'm not sure how you're planning to handle it. The most simple way would be to have 9 separate uiimageviews holding the 9 separate uiimages that you can create with that function.
baja_yu is offline   Reply With Quote
Reply

Bookmarks

Tags
image, image crop, iphone, puzzle, puzzle game

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 402
16 members and 386 guests
blasterbr, buggen, Clouds, dre, EvilElf, HemiMG, jeroenkeij, jimmyon122, jonathandeknudt, LEARN2MAKE, Mah6447, n00b, nyoe, pungs, Sami Gh, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,668
Threads: 94,121
Posts: 402,900
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jonathandeknudt
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:54 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0