Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7930817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:32:36+00:00 2026-06-03T20:32:36+00:00

I am need to convert image into hex string to send it to web

  • 0

I am need to convert image into hex string to send it to web server. I am using this method to convert image to byte array

         BitmapFactory.Options options = new BitmapFactory.Options();
         options.inSampleSize = 8; 
         Bitmap receipt = BitmapFactory.decodeFile(photo.toString(),options);
         int size = receipt.getRowBytes() * receipt.getHeight();  
         ByteArrayOutputStream stream = new ByteArrayOutputStream();
         receipt.compress(Bitmap.CompressFormat.JPEG, 90, stream);
         receiptbyte = stream.toByteArray();   
         String hexstring = toHex(receiptbyte);  

and this to convert into hex

   public static String toHex(byte[] bytes) {
    BigInteger bi = new BigInteger(1, bytes); 
    return String.format("%0" + (bytes.length << 1) + "X", bi);
}

i want to produce the output as like

c11ee236-8f72-4b60-9208-79977d61993f

I am not sure what to do. Do i need to encode it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:32:37+00:00Added an answer on June 3, 2026 at 8:32 pm

    The string you have like c11ee236-8f72-4b60-9208-79977d61993f is not an image – it looks more like an ID to an image stored on a server.

    If you want the image you have to send the ID to the server and the server sends back the image data stored in it’s database that belongs to the ID.

    In Java you can generate such random IDs simply by yourself:

    UUID u = UUID.randomUUID();
    System.out.println(u.toString());
    

    Outputs for example: 3aa5b32d-c6fb-43c5-80c9-78a1a35aff40

    Building your own server you can use this and save both image data and this ID into a database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want convert image into byte array in php.actually i am accessing web service
Part 1) I have a bitmap/jpeg image. I need to convert this image into
I need to be able to download an image from a remote web server,
I have an transparent .PNG image that I need to convert into an .CUR
I need to convert a PNG Image loaded from a file into an 8
I need to convert a image (square) into a quadtree, in the 'usual' way
I need to convert the video into png images. I did that using ffmepg.
is there some way to convert a base64 string into an image; in Visual
Using Oracle How can one convert an image file stored as a clob into
I have 28,000 images I need to convert into a movie. I tried mencoder

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.