xkcd-Open-Source icon indicating copy to clipboard operation
xkcd-Open-Source copied to clipboard

Resolves issue #74 - implement "2x" images on retina devices

Open leptos-null opened this issue 5 years ago • 2 comments

To appropriately implement "retina" images, the device screen scale is checked. #74 mentions 1084 being the first supported comic. If both these conditions are met, the string representing the URL is modified. Another option for the string manipulation is

        NSString *patchingImageString = [self.imageURLString stringByDeletingPathExtension];
        patchingImageString = [patchingImageString stringByAppendingString:@"_2x"]
        self.imageURLString = [patchingImageString stringByAppendingPathExtension:@"png"];

The above approach is more clear, however I felt that the performance trade-offs were not worth using it.

leptos-null avatar Oct 01 '18 20:10 leptos-null

Beginning at 1084, most comics are Retina, but a few before that are also Retina, such as 1053 and 1061.

Zarel avatar Dec 27 '19 22:12 Zarel

Adding to the dataset: Today I tested all comics from 1084 to 2266 for associated _2x.png files. I logged the response.ok values for each request, and all returned true except for these comic IDs, which returned false:

1097
1103
1110
1116
1127
1182
1190
1193
1229
1253
1264
1331
1335
1349
1350
1416
1446
1452
1461
1491
1506
1525
1551
1608
1663
1667
1735
1739
1744
1778
2202

jsejcksn avatar Feb 11 '20 02:02 jsejcksn