Jump to content
  • 0

[help] guys please help with image!


Question

Posted

I have a problem with image.

 

Use this code in instance npc.

 

int imgId = 99999999;

    try {

      File pass = new File("data/images/example.png");

      PledgeCrest packet = new PledgeCrest(imgId, DDSConverter.convertToDDS(pass).array());

      activeChar.sendPacket(packet);

    }

    catch (Exception e)

    {

    }

 

and this --> tb.append("<img src=\"Crest.crest_" + Config.SERVER_ID + "_" + imgId + "\" width=128 height=128>");

 

When i go to see npc the image is black why?

10 answers to this question

Recommended Posts

  • 0
Posted

I don't know if you followed any shared source, but I doubt png format is correctly displayed in a PledgeCrest. I'm perhaps wrong. Or it perhaps depends of your chronicle / source chronicle.

 

It's part of a catpcha antibot system, right ?

  • 0
Posted

I don't know if you followed any shared source, but I doubt png format is correctly displayed in a PledgeCrest. I'm perhaps wrong. Or it perhaps depends of your chronicle / source chronicle.

 

It's part of a catpcha antibot system, right ?

I forgot to say that i have l2jfrozen.

I have DDSConverter.java at pack.

do not understand what I'm doing wrong.

  • 0
Posted

I think u need .bmp picture so change it

i don't think it is needed .bmp are for crests with low collors he wants to have an image in an npc .png is right...

  • 0
Posted

yes friend here data/images/example.png

 

can you post an image of your example.png please?

and put this in your catch, to see if it's throwing an exception. Then build it and go try it again, then check your console for errors.

 

catch (Exception e)

{

      System.out.println(e);

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...