Home / Function/ getImageDimensionsFromFixture() — astro Function Reference

getImageDimensionsFromFixture() — astro Function Reference

Architecture documentation for the getImageDimensionsFromFixture() function in core-image-service.test.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  c7f7a69f_ea8f_fe49_8db5_5a695b0cf44d["getImageDimensionsFromFixture()"]
  28a0e8d4_971a_de31_7103_209c0aa34aae["core-image-service.test.js"]
  c7f7a69f_ea8f_fe49_8db5_5a695b0cf44d -->|defined in| 28a0e8d4_971a_de31_7103_209c0aa34aae
  style c7f7a69f_ea8f_fe49_8db5_5a695b0cf44d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/core-image-service.test.js lines 8–14

async function getImageDimensionsFromFixture(fixture, path) {
	/** @type { Response } */
	const res = await fixture.fetch(path instanceof URL ? path.pathname + path.search : path);
	const buffer = await res.arrayBuffer();
	const { width, height } = await probe(new Uint8Array(buffer));
	return { width, height };
}

Subdomains

Frequently Asked Questions

What does getImageDimensionsFromFixture() do?
getImageDimensionsFromFixture() is a function in the astro codebase, defined in packages/astro/test/core-image-service.test.js.
Where is getImageDimensionsFromFixture() defined?
getImageDimensionsFromFixture() is defined in packages/astro/test/core-image-service.test.js at line 8.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free