runelite-client/src/main/java/net/runelite/client/game/ItemManager.java
/**
	 * Loads item sprite from game, makes transparent, and generates image
	 *
	 * @param itemId
	 * @return
	 */
Loads item sprite from game, makes transparent, and generates image
@param itemId
@return
Loads item sprite from game makes transparent and generates image @param itemId @return
private AsyncBufferedImage loadImage(int itemId, int quantity, boolean stackable)
	{
		AsyncBufferedImage img = new AsyncBufferedImage(36, 32, BufferedImage.TYPE_INT_ARGB);
		clientThread.invokeLater(() ->
		{
			if (client.getGameState().ordinal() < GameState.LOGIN_SCREEN.ordinal())
			{
				return false;
			}
			SpritePixels sprite = client.createItemSprite(itemId, quantity, 1, SpritePixels.DEFAULT_SHADOW_COLOR,
				stackable ? 1 : 0, false, CLIENT_DEFAULT_ZOOM);
			if (sprite == null)
			{
				return false;
			}
			sprite.toBufferedImage(img);
			img.changed();
			return true;
		});
		return img;
	}
private AsyncBufferedImage loadImage ( int itemId , int quantity , boolean stackable ) { AsyncBufferedImage img = new AsyncBufferedImage ( 36 , 32 , BufferedImage . TYPE_INT_ARGB ) ; clientThread . invokeLater ( ( ) -> { if ( client . getGameState ( ) . ordinal ( ) < GameState . LOGIN_SCREEN . ordinal ( ) ) { return false ; } SpritePixels sprite = client . createItemSprite ( itemId , quantity , 1 , SpritePixels . DEFAULT_SHADOW_COLOR , stackable ? 1 : 0 , false , CLIENT_DEFAULT_ZOOM ) ; if ( sprite == null ) { return false ; } sprite . toBufferedImage ( img ) ; img . changed ( ) ; return true ; } ) ; return img ; }
Loads item sprite from game, makes transparent, and generates image
 @param itemId
 @return
Loads item sprite from game makes transparent and generates image @param itemId @return