Home / Function/ getImageDimensionsFromLocalFile() — astro Function Reference

getImageDimensionsFromLocalFile() — astro Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

packages/astro/test/core-image-service.test.js lines 16–20

async function getImageDimensionsFromLocalFile(fixture, path) {
	const buffer = await fixture.readFile(path, null);
	const { width, height } = await probe(new Uint8Array(buffer));
	return { width, height };
}

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free