Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use image buffer for apple splash screens #26

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/api/apple-icons-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { generateMaskableAsset } from './maskable.ts'
import { createAppleSplashScreenHtmlLink } from './html.ts'

export function resolveAppleSplashScreensInstructions(
// eslint-disable-next-line n/prefer-global/buffer
image: Buffer,
imageAssets: ImageAssets,
instructions: ImageAssetsInstructions,
useAppleSplashScreens?: AppleSplashScreens,
Expand Down Expand Up @@ -96,7 +98,7 @@ export function resolveAppleSplashScreensInstructions(
for (const size of splashScreens) {
const name = resolveName(size.landscape, size.size, size.dark)
const url = `${imageAssets.basePath}${name}`
const promise = () => generateMaskableAsset('png', imageAssets.imageName, size.size, {
const promise = () => generateMaskableAsset('png', image, size.size, {
padding: size.padding,
resizeOptions: {
...size.resizeOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/api/instructions-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export async function resolveInstructions(imageAssets: ImageAssets) {
}
}

resolveAppleSplashScreensInstructions(imageAssets, instructions, useAppleSplashScreens)
resolveAppleSplashScreensInstructions(image, imageAssets, instructions, useAppleSplashScreens)

return instructions
}
Expand Down