I reduce your code you were using two times more UIImageJPEGRepresentation try this
- (NSData *)imageConvertToBinary :(UIImage *) image{
NSData *data ;
NSLog(@"Start while ");
int temp=0;
while (data.length / 1000 >= 10) {
image = [UIImage imageWithImage:image andWidth:image.size.width/2 andHeight:image.size.height/2];
data = UIImageJPEGRepresentation(image, .0032);
temp++;
NSLog(@"temp %u",temp);
}
NSLog(@"End while ");
int size = data.length;
NSLog(@"SIZE OF IMAGE:after %i ", size);
return data;
}