Archive for April 19, 2026

Sunday, April 19, 2026

Fast Thumbnails With CGImageSource

Max Seelemann:

The parameters are documented, but the optimal combination is not. Here’s what I learned:

  • kCGImageSourceCreateThumbnailFromImageAlways: While this seems optional for correct functionality, without it there will be error logged for images that might include embedded thumbnails (like JPEG or HEIC), but don’t. There’s a FromImageIfAbsent variant, but it did not silence these logs in all cases.
  • kCGImageSourceCreateThumbnailWithTransform: Required for the thumbnail to respect the EXIF orientation of the image, in case it has one (which is not uncommon for JPEG).
  • kCGImageSourceThumbnailMaxPixelSize: Specifies the largest dimension of the desired thumbnail; the returned image will then be equal or smaller than this.

The first test showed incredible improvements: The same 12MP JPEG image now took just about 26ms on macOS. That’s almost 30 times faster than the naive approach.

Image I/O has some very useful APIs, although unfortunately it hasn’t always been well tested. I ended up writing four different versions of an image resizer because different parts of the API would fail on certain files with different macOS versions. The resizer keeps trying different techniques until it finds one that works. Also, sometimes the APIs raise C++ exceptions. If you don’t catch these from Objective-C using @catch (...) (literally, three periods), your app will crash.

Brent Simmons:

Avoid bug in CGImageSourceCreateImageAtIndex with indexed-color (4-bit palette) ICO files — always use CGImageSourceCreateThumbnailAtIndex.

Previously:

John Deere Right-to-Repair Settlement

Caleb Jacobs (via Hacker News):

While the agricultural manufacturing giant pointed out in a statement that this is no admission of wrongdoing, it agreed to pay $99 million into a fund for farms and individuals who participated in a class action lawsuit. Specifically, that money is available to those involved who paid John Deere’s authorized dealers for large equipment repairs from January 2018. This means that plaintiffs will recover somewhere between 26% and 53% of overcharge damages, according to one of the court documents—far beyond the typical amount, which lands between 5% and 15%.

The settlement also includes an agreement by Deere to provide “the digital tools ​required for the maintenance, diagnosis, and repair” of tractors, combines, and other machinery for 10 years. That part is crucial, as farmers previously resorted to hacking their own equipment’s software just to get it up and running again.

Previously:

Globalstar Takeover

Tim Hardwick (Hacker News):

Amazon and Globalstar have announced a definitive merger agreement under which Amazon will acquire the satellite operator.

[…]

Alongside the acquisition, Amazon and Apple have signed a separate agreement for Amazon’s Leo satellite network to power existing iPhone and Apple Watch satellite features, including Emergency SOS, Messages via satellite, Find My, and Roadside Assistance via satellite.

Dan Moren:

Amazon acquiring Globalstar gives it a leg up in its attempt to take on Starlink, which is the biggest player in this space. But Apple previously sank a billion-dollar-plus investment into Globalstar, whose system underpins its satellite features.

That stake seems to have bought Apple some assurances, including support for not only current but future devices. The ongoing question for Apple’s satellite features is whether users will ever end up paying for them, something that the company has been happy to continually kick down the road.

Jon Brodkin:

Amazon didn’t go into much more detail about the features it will support on Apple devices. Bloomberg reported in November that Apple was working on a satellite framework for third-party apps that would let developers add satellite connections to their apps. Apple was also reportedly working on satellite-powered maps and richer messaging capabilities for satellite connections.

Amazon and Globalstar operate at smaller scales than Starlink, which already has over 10,000 satellites in orbit and plans for many more. So far, Starlink’s constellation includes about 650 D2D satellites for mobile service, which is offered through T-Mobile in the US and other carriers abroad.

Amazon has deployed 241 satellites and says it will have over 3,000 when its initial satellite constellation is complete. Globalstar operates 24 satellites in low-Earth orbit (LEO) and has said its third-generation system, or C-3, will include 48 additional satellites.