I am using this code for my slider for cropping image for UISlider when i am Dragging Slider then image is Blurring how can it without Blurring and Losing without its Clarity
- (UIImage *) revealedTrackImageForCurrentValues {
//Get left and right x positions
float lowerHandleWidth = _lowerHandleHidden ? 2.0f : _lowerHandle.frame.size.width;
float upperHandleWidth = _upperHandleHidden ? 2.0f : _upperHandle.frame.size.width;
float xLowerValue = ((self.bounds.size.width - lowerHandleWidth) * (_lowerValue - _minimumValue) / (_maximumValue - _minimumValue))+(lowerHandleWidth/2.0f);
float xUpperValue = ((self.bounds.size.width - upperHandleWidth) * (_upperValue - _minimumValue) / (_maximumValue - _minimumValue))+(upperHandleWidth/2.0f);
//Crop the image
CGRect croppedImageRect = CGRectMake(xLowerValue, 0.0f, xUpperValue - xLowerValue, self.trackImage.size.height);
CGImageRef croppedImageRef = CGImageCreateWithImageInRect([self.trackImage CGImage], croppedImageRect);
UIImage *croppedImage = [UIImage imageWithCGImage:croppedImageRef];
CGImageRelease(croppedImageRef);
return croppedImage;
}
how can i do it without lossing image clearity ??