Post marked as unsolved
5
Views
So i have noticed the past couple days that i have been unable to search for GIFS on the built in application on iMessage, #images. This has happened on both my iPad and both my iphones. And im not the only one A lot of my friends and family are having the same problem. I have tried every workaround but I honestly believe it has something to do with the update.
everything I’ve tried: resetting my phone
turning on and off Wi-Fi and cellular data
Clearing space on my phone
Does anybody know if Apple is working on this ?
Post marked as unsolved
105
Views
We are using the PHPickerViewController to load photos and videos into our app. When an item was picked we load it using the loadFileRepresentation() method of NSItemProvider. In its callback we get the following error sometimes:
Error copying file type public.movie. Error: Error Domain=NSItemProviderErrorDomain Code=-1000 "Cannot load representation of type public.movie" UserInfo={NSLocalizedDescription=Cannot load representation of type public.movie, NSUnderlyingError=0x281a87a50 {Error Domain=NSCocoaErrorDomain Code=4101 "Couldn’t communicate with a helper application." UserInfo={NSUnderlyingError=0x281a85e30 {Error Domain=PHAssetExportRequestErrorDomain Code=0 "(null)" UserInfo={NSUnderlyingError=0x281a85620 {Error Domain=PFSharingRemakerErrorDomain Code=2 "Underlying operation encountered an error" UserInfo=0x280018500 (not displayed)}}}}}}
The error seems to occur randomly when picking arbitrary videos. What does the error mean and how do we make the item provider load more reliably here?
Post marked as unsolved
22
Views
How to delete the PHAsset from device permanently to get more space on device immediately?
I could only find the following API to delete PHAsset from the Photos app which is moving the assets to "Recently Deleted" album which is still holding memory on the device,
PHAssetChangeRequest.deleteAssets((assets as NSArray))
Is there a solution to delete assets (programmatically) from the Photos app permanently?
Post marked as unsolved
104
Views
Hi,
I have a little issue with this new API PHPPickerViewController:
var configuration = PHPickerConfiguration()
configuration.filter = .any(of: [.images])
configuration.selectionLimit = 10
configuration.preferredAssetRepresentationMode = .compatible
let picker = PHPickerViewController(configuration: configuration)
picker.delegate = self
present(picker, animated: true, completion: nil)
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
var selectedPhotosData : [Data] = []
for (index,result) in results.enumerated() {
				 result.itemProvider.loadFileRepresentation(forTypeIdentifier: "public.jpeg") { (url, error) in
guard let fileUrl = url else {return }
print(fileUrl)
}
}
This code above doesn't work, I don't get the URL at all. I tried on Simulator and real device but the same problem. I tried loadObject function but I can't the UIImages...
I saw some workarounds here but they don't work in my case it seems...
Post marked as unsolved
39
Views
I think the image resizing process when creating the new contact is not done correctly.
It's easy to understand if you create a vCard.
[Steps] Take two pictures with the same subject. (Let "IMG_A" and "IMG_B".)
Create a "New Contact".
2-1. Tap [Add Photo] and select "IMG_A".
2-2. Tap the [Choose] without doing anything in "Move and Scale".
2-3. Tap [Done] a few times to set the Photo.
2-4. Entering a name and other information is optional.
3. Save the contact as a vcf file to Files App.
* [Share Contact] - [Save to Files] - [On My iPhone] - [Save]
4. Edit the contact that saved at step 2.
4-1. Release "IMG_A", and set the "IMG_B" in the same as the step 2-1 to 2-3.
5. Save the contact as a vcf file to Files app in the same as step 3.
6. Check the size of the two vcf files.
[Result]
The size of the two vcf files are very different.
I think the cause is PHOTO property.
As a result of extracting the image from vCard, the resolution was as follows.
(Original: 3024 * 4032)
IMG_A: 2784 * 2784
IMG_B: 320 * 320
[Remarks]
I checked this issue occur iOS14(include new version of 14.4.2) and iOS12 is not occured.
Post marked as unsolved
17
Views
I need to save an image in Data/NSData format on a particular album on iOS device.
New data structure is important because the raw image data is generated with an algorithm.
I've tried different ways to store this raw data, but every used method, apply some data correction on the data to make the image "conform" to the (JPEG/HEIC/PNG) specifications, and I don't want this.
Let's make an example:
I edit the data on the image, adding on the tail (or in the middle, the behavior is the same) new values, 0xAA 0xBB, 0xCC.
I want to save the image with this value at the end of the image bytes.
Original IMAGE -VS- CUSTOM IMAGE
35 1E 49 35 1E 49
A4 A8 B0 A4 A8 B0
1F FF D9 1F FF D9
••••••••••••••••••••AA BB CC
The only way to save the image AS-IS is to write a file using writeToFile, like this: Data().write(to: URL(string: "/path/image.png"))
In this way the data content is preserved and all is fine BUT if I need to save this image to a particular album or to camera roll the image will be edited by iOS, removing my final bytes that I've inserted (0xAA, 0xBB and 0xCC).
This because the iOS recalculate the CRC of the image?
Code
I've used PHAssetCreationRequest (from Photos framework):
PHPhotoLibrary.shared().performChanges({
PHAssetChangeRequest.creationRequestForAsset(from: image)
}) { status, error in }
used also UIImageWriteToSavedPhotosAlbum:
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil).
I've used also PHAdjustmentData value and passing my custom bytes,
asset.requestContentEditingInput(with: options, completionHandler: { input, info in
let adjustmentData = PHAdjustmentData(
formatIdentifier: self.formatIdentifier,
formatVersion: self.formatVersion,
data: myCustomData)
let output = PHContentEditingOutput(contentEditingInput: input)
output.adjustmentData = adjustmentData
PHPhotoLibrary.shared().performChanges({
let request = PHAssetChangeRequest(for: asset)
request.contentEditingOutput = output
}, completionHandler: { success, error in
if !success { print("can't edit asset: \(error)") }
})
})
but in this case I receive a generic error without any explanation:
can't edit asset: Optional(Error Domain=PHPhotosErrorDomain Code=-1 "(null)")
The problem is that when I load the image using PHAsset or whatever from the camera roll, the image doesn't contain my custom 0xAABBCC bytes at the end.
Question:
How can I preserve the raw byte information while saving an image to photo album?
Post marked as unsolved
19
Views
Hi!
I have question. How can I insert image to text view with smaller size(scaled to text view), but with keeping quality? Like in Notes on iOS - picture with high quality weight around 800kB. Thanks.
Post marked as unsolved
127
Views
I'm writing a project to modify the pixels of the picture with the swiftUI, but every time the modified Uiimage is saved to the system library, it will become jpg format. You know, jpg will compress the picture, thus changing the pixels of the picture, so I want to find a way to convert the UIimage into a png into a library or a file app.
Post marked as unsolved
17k
Views
Can't save gifs, it just saves frame of it as a photo.
Post marked as unsolved
341
Views
Using UIImagePickerController, on all devices except iPhone 12 and iPhone 12 Pro (and maybe devices that will become available in the future) the camera preview is aligned at the top of the screen. On the iPhone 12 and iPhone 12 Pro (and maybe other iPhone 12 variants), the preview is no longer aligned at the top, but at a position that does not seem to be determinable (guess: about 100 pixels from the top).
This becomes a problem if cameraOverlayView is used to present a mask to the user to help him positioning an object at a specific location within the capture.
The alignment of the preview should be at the top of the screen (as on other devices) or there should be any way to determine the offset. Anyone has any idea how to solve that?
Post marked as unsolved
478
Views
I notice that when I open the Photos app on my iPhone 12 Pro, viewing Photos or Videos shot in HDR makes them brighter than the overall display brightness level.
On macOS, there are APIs like EDRMetadata on CAMetalLayer and maximumExtendedDynamicRangeColorComponentValue on NSScreen.
I did see
CAMetalLayer.wantsExtendedDynamicRangeContent, but I'm not sure if this does what I'm looking for.
The "Using Color Spaces to Display HDR Content" - https://developer.apple.com/documentation/metal/drawable_objects/displaying_hdr_content_in_a_metal_layer/using_color_spaces_to_display_hdr_content?language=objc documentation page describes setting the .colorspace on the CAMetalLayer for BT2020_PQ content, but it's not clear if this is referring to macOS or iOS. Is that the right way to get colors to be "brighter" than 1.0 on "XDR" mobile displays?
Post marked as unsolved
410
Views
I am attempting to use PHPicker to allow the user to select a photo for use in my app. I see a behavior that if the user tries to search for a photo, the picker fails with error: "Picker Unavailable - There was an error while preparing the picker. Please try again later.". This behavior sometimes doesn't show until the second attempt. If the user doesn't interact with the search feature, then everything works fine.
I have made a simplified app that exemplifies the issue.
Github repo - https://github.com/IceTrae/ImagePickerTest
Any help is appreciated.
Post marked as unsolved
38
Views
How does HEIC translate to JPG
Post marked as unsolved
41
Views
Imported photos onto Big Sur using Image Capture.
Selected all photos and told it to delete.
Looks like it works - reports no photos in Image Capture.
However, NONE of the photos were removed from the phone.
Unplugging and replugging in the phone makes the photos re-appear within Image Capture.
I don't see a way to erase all photos from the iPhone.
Post marked as unsolved
48
Views
Hi everyone. I used to import with iphoto on my mac via usb the pics i usually take with my iPhone. At the end after import' process my mac used to ask me if i wanted to erase photo on iphone. Now it is not more asking this. Is it becouse they changed somthing or
becouse i have a beta version on iphone or
becouse i have streaming photo activated?
Please help