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);

}

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock