Post

Replies

Boosts

Views

Activity

HEIC images aren't lossless
I'm trying to use Image I/O to create lossless HEIC images. As far as I can tell, it isn't possible. I've added a 1 pixel border around an TIFF image. When I save the TIFF image as HEIC, the border blurs to 3 pixels. If I save to PNG, changing only the "type" parameter in "CGImageDestinationCreateWithURL" the result is lossless. I compared this behaviour with Pixelmator Pro and Apple's own Preview. When I move the quality knob all the way over to lossless, I still get that blurry 3 pixel border. I have set the kCGImageDestinationLossyCompressionQuality option to 1.0. I can change the quality and see how it changes, but I can't get it to lossless mode. Is there some other way to get HEIC into lossless mode that I don't know about?
2
0
3.4k
Dec ’20
Cannot export 2nd archive using Xcode 12.3 on Big Sur
I have Xcode 12.3 running on both Catalina and Big Sur. I have a strange problem that only exists on Big Sur. I can build an app, archive it, and export it with no problem. But if I try this again, it will fail with the following error message: Didn't find executable for bundle NSBundle <(null)> (not yet loaded) at path <DVTFilePath:0x7fc9f1948fa0:'/Users/$HOME/Library/Developer/Xcode/Archives/2020-12-21/MyApp 2020-12-21, 9.26 PM.xcarchive/Products/Applications/MyApp.app/Contents/Library/QuickLook/MyAppQL.qlgenerator'>. I can export previous builds, but not the one I just made. Nor can I export any newer builds. Once I get this error, no more exporting. To fix it, just quit Xcode. Now I can export the previous build with no problem. I can also build one more app and export that one, but only one. After that, I have to quit Xcode again. It works fine on Catalina.
1
0
1.5k
Dec ’20
Metal performance compared to OpenCL
I am working on porting some code to Metal. I have a popular open source library that runs entirely on the CPU. I have another package that performs the same functionality on OpenCL. I am trying to port the OpenCL package to Metal so I can get GPU performance on all devices. The OpenCL package has a nice test set that compares its own output against the reference project. On the two simplest test cases, OpenCL runs about 14 and 24 times as fast as on the CPU. My Metal version is consistently 4 times slower than OpenCL. It is still several times better than the CPU version, but why would it be so slow compared to OpenCL? These two test cases are the absolute easiest and simplest ones there are. It is doing a Mercator map projection, so this is all there is for the Metal code: kernel void project_mercator_s( device const float2 * xy_in [[buffer(0)]], device float2 * xy_out [[buffer(1)]], &#9;device const spherical_params * params [[buffer(2)]], &#9;uint index [[thread_position_in_grid]]) &#9;{ float lambda = radians(xy_in[index].x); float phi = radians(xy_in[index].y); float x = lambda; float y = asinh(tan(phi)); xy_out[index].x = params->x + params->scale * x; xy_out[index].y = params->y + params->scale * y; &#9;} The OpenCL version is the same: &#92;&#95;&#92;&#95;kernel void pl_project_mercator_s( &#92;&#95;&#92;&#95;global float16 *xy_in, &#92;&#95;&#92;&#95;global float16 *xy_out, const unsigned int count, float scale, float x0, float y0) { int i = get_global_id(0); float8 lambda = radians(xy_in[i].even); float8 phi&#9;&#9;= radians(xy_in[i].odd); float8 x, y; x = lambda; y = asinh(tan(phi)); xy_out[i].even = x0 + scale * x; xy_out[i].odd&#9;= y0 + scale * y; } I have removed all the Metal setup code from the time comparison. My test data set has 200,000 pairs of floats. I'm using shared memory buffers. I tried using a private buffer but my dataset is so small that the time to do the copying into the private buffer was longer than just using a shared memory buffer. Is this normal? Is there something I'm missing?
13
0
6.7k
Oct ’20
Desperately needed features
It looks like these new forums are based on the new Apple Support Communities code. I frequently post on ASC so I know what does and does not work there. I will focus on features that need to be imported from ASC and features that don't. Email notifications - Some people really like to work from e-mail notifications. ASC has notifications for participation, following, points, etc. Just make sure they always default to "OFF". Subscriptions - ASC already has this and is (in my opinion) the ideal way to find and respond to questions. Essentially, this is just searching on multiple tags. The subscriptions is an interface to let me define what tags I want to search for by default. Sorting - Primarily, we need to see messages sorted by descending timestamp. Sorting - I would like to be able to sort by both created or updated timestamps. Sometimes I want to see bona fide new messages. Searching - This is ASC's big weak spot. Search is virtually useless on ASC. You have to really tweak the "filters" to get anything useful out of it. Re-do this and then back-port it to ASC please. Threads - Thread view is all messed up. This thread (https://developer.apple.com/forums/thread/134075) is a good example. It seems to be organized hierarchically, with new replies to individual posts appearing immediately after the post being replied to. This is really confusing. Just order it by timestamp. ASC has a feature to automatically guess the target forum (tag in these forums) from the content of the question being asked. That would be useful here. Otherwise, you risk everything going into "iOS". Provide an easy way to see my own posts to see if anything has been updated. ASC doesn't really offer this. I have found a custom filter query that I use to simulate the "Inbox" of an old version of ASC. None of those custom filters seem to work over here. This is another opportunity to fix and then port back to ASC. Filtering - ASC has a complicated system of filtering. Please don't import that. 10. Subscriptions - If you do implement a subscriptions system like ASC, pay attention to unpopular forums. Otherwise, new question in popular forums will drown out questions in more specific forums. The "Top Tags" list has already started that. Of course "iOS" and "macOS" will be most popular. But if everybody uses only those tags, they become useless. Specialties - This is part of ASC gamification system. I don't necessarily mind them, but they aren't implemented very well on ASC. One has to perform specific actions, such as asking a question, to start earning a speciality. What about people who don't ask questions? How do you handle people with multiple specialties? ASC seems to pick one at random and display it, which is very annoying. Guidelines - I think the Terms of Use need to be expanded and be crystal clear about what is allowed and not. I've just seen my first help wanted ad here. Is that allowed? I don't know. Other comments: Very nice use of Markdown in the editor. This is probably not something that could be ported back to ASC. Developers should be able to handle it though. I like the documentation links at the top of tag results pages.
6
0
1.6k
Jun ’20