# 8 fitted pictures inside the circle

Hello, I simply have a circle, squared UIView with side size of x and corner radius x/2. Additionally I also have 8 png UIImage's with different sizes.

What do I need to have?

I need to have a function with array of images as parameter. That function draws delivered images and create and return new UIImage along with all properties for every image (x, y, width, height, rotation).

Requirements (OBLIGATORY):

- all images should fill circle as much as possible (if there is enough space to make any image significantly bigger, then it is wrong)

- space between them and between edge of the circle should be acceptable and just nice;)

- position of any image within circle should be randomly generated.

- every image should have randomly changed size.

- rotation of any image should be randomly generated

- every image should preserve its ratio.

- every image should not be greater than A value, and should not be smaller than B value (A and B always is related and compared to the longest side of rectangle). In other words minimum size of the image cannot be less than A, and maximum cannot be greater than B.

- images (not empty pixels in png files) cannot be placed over another images even partly.

- A lot of images will be placed as PNG images. Often png image has a lot of pixels which are transparent. While you create algorithm for this, consider empty pixels as a free space to fulfill with any other image.

- rendering 60 sets of images from 8 images for every set should take between 1-2 seconds, not more.

If you do not fully understand what I mean, please ask. I will accept the project once all requirements will be filled;-) Thank you.

Example of how it should look like and how it should not I will send you in private message only if you know how to do this.

``class ImageCoordinate { //in coordinate system of the card

var x: Double // center position x

var y: Double // center position y

var w: Double // width

var h: Double // height

var r: Double // rotation

init(x: Double, y: Double, w: Double, h: Double, r: Double) {

self.x = x

self.y = y

self.w = w

self.h = h

self.r = r

}

}

class CardImage {

let cardImage: UIImage //final card image

let coordinates: [ImageCoordinate] //coordinates for every single image in coordinate system of the card, order of coordinates in the same order as images was passed to the init.

var positions: [[String: Double]] {

var values = [[String: Double]]()

for coordinate in coordinates {

var value = [String: Double]()

value[CenterXKey] = coordinate.x

value[CenterYKey] = coordinate.y

value[WidthKey] = coordinate.w

value[HeightKey] = coordinate.h

value[RotationKey] = coordinate.r

}

return values

}

init(image: UIImage, coordinates: [ImageCoordinate]) {

[login to view URL] = image

[login to view URL] = coordinates

}

}

class ImageCreator {

private let radius: CGFloat //size of the circle

private let backgroundColor: UIColor //color for background of the card

private let minimumImageWidthHeight: CGFloat //maximum value for image height, minimum

private let maximumImageWidthHeight: CGFloat

init(radius: CGFloat, backgroundColor: UIColor, minimumImageWidthHeight: CGFloat, maximumImageWidthHeight: CGFloat) {

[login to view URL] = backgroundColor

[login to view URL] = minimumImageWidthHeight

[login to view URL] = maximumImageWidthHeight

}

func card(from images: [UIImage]) -> CardImage {

//.. here I am going to use your alhgorthm written in C (I suppose it is best idea, but doesnt have to) in Swift

}

}

``

Về Bên Thuê:
( 3 nhận xét ) Krakow, Poland

ID dự án: #29481116

## Được trao cho:

nachimd1985

hi, this is Nasir Mehmood. I am a software engineer and have more than 20 years of development experience in embedded systems, database design, web design, graphics, and mobile applications. i have extensive knowledge Thêm

\$1000 USD trong 25 ngày
(8 Đánh Giá)
4.6

## 9 freelancer chào giá trung bình\$572 cho công việc này

hbxfnzwpf

I am very proficient in c/c++. I have 17 years c/c++ developing experience now, and have worked for more than 10 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environm Thêm

\$300 USD trong 5 ngày
(200 Nhận xét)
7.3
techplusintl

Hi there, ★★★ C / C++ Expert ★★★ 10+ Years of Experience ★★★ I've read requirements and ready to build a function with array of images as parameter. I have strong grasp on Object-Oriented Programming along with excell Thêm

\$750 USD trong 4 ngày
(12 Nhận xét)
5.6
abhishekchouras6

Hi , Awesome Got your requirement you want 8 fitted pictures inside the circle We have developed more than 2000+ android apps and 5000+ websites and we are committed to time and will do in the budget thanks

\$250 USD trong 7 ngày
(16 Nhận xét)
4.0
elregresodejosec

Hi, I can develop it. I will develop it with flutter. I have rich experience about that. I will share the similar app via chatting. Regards Jose

\$500 USD trong 5 ngày
(1 Nhận xét)
2.9

Hey, This is a Perfect match as I have 12+ years of experience in Mobile Application Development for IOS and Android. I have completed 50+ Projects and I will make your app with Premium Quality and in Less Time. Take Thêm

\$495 USD trong 7 ngày
(1 Nhận xét)
1.3
jeghalef

Hello, I will create the demo code for alignment of 8 images in the circle. I am a professional iOS developer specialized in Swift. I am really interesting. Please discuss further. Thanks Imad

\$750 USD trong 6 ngày
(0 Nhận xét)
0.0