MCPcopy Create free account
hub / github.com/buggins/coolreader / getImageData

Method getImageData

android/src/org/coolreader/crengine/Engine.java:1284–1296  ·  view source on GitHub ↗
(BackgroundTextureInfo texture)

Source from the content-addressed store, hash-verified

1282 }
1283
1284 public byte[] getImageData(BackgroundTextureInfo texture) {
1285 if (texture.isNone())
1286 return null;
1287 if (texture.resourceId != 0) {
1288 byte[] data = loadResourceBytes(texture.resourceId);
1289 return data;
1290 } else if (texture.id != null && texture.id.startsWith("/")) {
1291 File f = new File(texture.id);
1292 byte[] data = loadResourceBytes(f);
1293 return data;
1294 }
1295 return null;
1296 }
1297
1298 public BackgroundTextureInfo getTextureInfoById(String id) {
1299 if (id == null)

Callers 2

setBackgroundTextureMethod · 0.80
workMethod · 0.80

Calls 3

loadResourceBytesMethod · 0.95
startsWithMethod · 0.80
isNoneMethod · 0.45

Tested by

no test coverage detected