Skip to main content
SeungMin, Oh
Participating Frequently
November 14, 2024
Question

the thumbnail image will be broken. How to solve this?

  • November 14, 2024
  • 1 reply
  • 777 views

I would like to ask for advice regarding the phenomenon in which the thumbnail of the two images below appears broken. If you click the Query button and then click the mouse on the document or panel before all thumbnails are displayed, the thumbnail image will be broken. How to solve this?

 

This topic has been closed for replies.

1 reply

Mike Witherell
Community Expert
Community Expert
November 14, 2024

What software is this you are working in?

Mike Witherell
Robert at ID-Tasker
Legend
November 14, 2024
quote

What software is this you are working in?


By @Mike Witherell

 

Looks like some kind of UXP plugin. 

 

SeungMin, Oh
Participating Frequently
November 15, 2024
This is a plugin created using the InDesign SDK.
 
InterfacePtr<IK2ServiceRegistry>serviceRegistry(GetExecutionContextSession(), UseDefaultIID());
if(!serviceRegistry) return kFailure;
 
int32 numHandlers = serviceRegistry->GetServiceProviderCount(kImportProviderService);
for (int32 i = 0; i < numHandlers; i++) 
{
InterfacePtr<IK2ServiceProvider> provider( serviceRegistry->QueryNthServiceProvider(kImportProviderService, i));
InterfacePtr<IImportProvider> importProvider(provider, IID_IIMPORTPROVIDER);
 
if (importProvider && importProvider->CanImportThisStream(fileStream) == IImportProvider::kFullImport) 
{
 
InterfacePtr<IImportPreview> preview(importProvider, IID_IIMPORTPREVIEW);
.............
preview->Create24bitRGBPreview(....)
............
}
..
 
When using the service InterfacePtr<IK2ServiceProvider> provider(serviceRegistry->QueryNthServiceProvider(kImportProviderService, i)); to generate multiple previews, 
if another event intervenes during the process, an issue occurs where the bitmap of the preview fails to generate properly, as shown in the above screenshot.