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

  • Home
  • SEARCH
  • 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 8766147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:28:42+00:00 2026-06-13T16:28:42+00:00

I have a problem here identifying which method to use to display images sent

  • 0

I have a problem here identifying which method to use to display images sent from XML. I receive the following XML response :-

   <?xml version="1.0" encoding="UTF-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Header>
         <i18n:international xmlns:i18n="http://www.w3.org/2005/09/ws-i18n">
         <i18n:locale>en_US</i18n:locale></i18n:international>
    </soapenv:Header>
     <soapenv:Body>
     <get:GetCustAreaSnapshotResponseParam  xmlns:get="http://tnb.com.my/CGIS/D/getcustareasnapshotcon">
     <ResponseHdr>
     <ns2:ResponseId xmlns:ns2="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:ns1="http://tnb.com.my/CGIS/D/getcustareasnapshotpro">02946A91565A40210000013AB9B58E97</ns2:ResponseId>
     <ns2:ResTransactionId xmlns:ns2="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:ns1="http://tnb.com.my/CGIS/D/getcustareasnapshotpro">111112100334570</ns2:ResTransactionId>
  <ns2:ProviderId xmlns:ns2="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:ns1="http://tnb.com.my/CGIS/D/getcustareasnapshotpro">CGIS</ns2:ProviderId>
   <ns2:ResTimestamp xmlns:ns2="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:ns1="http://tnb.com.my/CGIS/D/getcustareasnapshotpro">2012-11-01T10:03:34.000+08:00</ns2:ResTimestamp>
    <ns2:ResStatus xmlns:ns2="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:ns1="http://tnb.com.my/CGIS/D/getcustareasnapshotpro">SUCC</ns2:ResStatus>
  <ns2:MsgCode xmlns:ns2="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:ns1="http://tnb.com.my/CGIS/D/getcustareasnapshotpro">IM-001</ns2:MsgCode>
   <ns2:MsgDesc xmlns:ns2="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:ns1="http://tnb.com.my/CGIS/D/getcustareasnapshotpro">Map Data Successfully Return to external Systems.</ns2:MsgDesc>
   </ResponseHdr>
   <ResGetCustAreaSnapshot>
       <cmc:GetCustAreaSnapshot xmlns:cmc="http://tnb.com.my/CGIS/D/cmc_customermgnt">
              <cmc:MAP_IMAGE_ZOOM1000>iVBORw0KGgoAAAANSUhEUgAAAaQAAAGkCAYAAAB+TFE1AAAQJUlEQVR4nO3d3XbbthZGUbgj7w==</cmc:MAP_IMAGE_ZOOM1000>
              <cmc:MAP_IMAGE_ZOOM2000>iVBORw0KGgoAAAANSUhEUgAAAaQAAAGkCAYAAAB+TFE1AAAHoElEQVR4nO3d3XKaUBhA0UMn7w==</cmc:MAP_IMAGE_ZOOM2000>
              <cmc:MAP_IMAGE_ZOOM4000>iVBORw0KGgoAAAANSUhEUgAAAaQAAAGkCAYAAAB+TFE1AAAHCklEQVR4nO3dya6bMABAUVPl</cmc:MAP_IMAGE_ZOOM4000>
       </cmc:GetCustAreaSnapshot>
  </ResGetCustAreaSnapshot>
  </get:GetCustAreaSnapshotResponseParam>

I am supposed to extract out MAP_IMAGE_ZOOM then use base64_decode. After decoding the string i receive the following when i echo out the result :-

 ‰PNG  IHDR¤¤~LQ5%IDATxœíÝÝvÛ¶FQ¸#ï

What type of encoding this is ?? And how am I suppose to display it as an image ?? I have tried :

 file_put_contents('test4000.png',  base64_decode($bin));

but the image displayed is just blank.

I also tried the following and also received a blank image :

 $img = html_entity_decode(base64_decode($bin), ENT_COMPAT,'ISO-8859-1');
 Header("Content-Type: image/png");
 die($img);

Would greatly appreciate any help given.

Thanks

  • 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-13T16:28:43+00:00Added an answer on June 13, 2026 at 4:28 pm

    This is PNG file, with an IHDR chunk and an IDAT chunk. These are described in http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html See also the previous page, http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html for overall PNG structure.

    The IHDR content tells me it’s a 420×420 image, 8 bits deep in RGBA triples (color, with transparency).

    IDAT is suspiciously short, but maybe the image is all one color with a tiny squiggle somewhere, or a very simple image. I toyed with your base64 string in Python, and saved the decoded data as a PNG file. Image reading apps tell me “read error” or “cannot load image”, so probably your IDAT is bad, or using a compression algorithm unknown to typical image readers.

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

Sidebar

Related Questions

I have a problem here, Basically. . I have a loop which has a
I have a problem here which i am trying to solve. The program is
i have a problem here of displaying a date type from ms access db
I have problem adding arraylist to list view, will explain about my problem here..
I have a problem here im trying to upload a file first time it
I have a problem here. My Zend_Forms do not render in view script. Via
I have a problem here I can't solve. I have a database of houses
I have a problem here with this code. I'm opening a socket, then listening
I have a problem here. Right now I'm doing my Web Based Application, my
I have a problem here that requires to design a data structure that takes

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.