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 7413307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:40:31+00:00 2026-05-29T06:40:31+00:00

In Google AppEngine I want to transform a boolean[] into an image then serve

  • 0

In Google AppEngine I want to transform a boolean[] into an image then serve the image. I want the boolean[] to be transformed to black and white pixels. I can see that AppEngine provides

import com.google.appengine.api.images.Image;
import com.google.appengine.api.images.ImagesService;
import com.google.appengine.api.images.ImagesServiceFactory;

// ...
byte[] imageData;  // ...   
ImagesService imagesService = ImagesServiceFactory.getImagesService();    
Image image = ImagesServiceFactory.makeImage(imageData);

but I don’t know what the format of the byte[] imageData should be, i.e., how to transform the boolean[] to byte[]

And once I have this image, how can the client get 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-05-29T06:40:32+00:00Added an answer on May 29, 2026 at 6:40 am

    The Image service API accepts data in any of the supported image file formats. According to this page, these formats include “JPEG, PNG, WEBP, GIF (including animated GIF), BMP, TIFF and ICO”. The Image service does not provide a way to create new image data from scratch. But you can use a graphics library to produce the image in one of the accepted data formats, then use the service to convert it to another format, or transform it. Of course, depending on the graphics library, you may be able to get the final image directly from the library, and not use the service.

    To serve an image, just set the appropriate Content-Type header for the data format you’re using, then write the bytes of the image data to the response’s output stream:

    // byte[] pngData = ...
    resp.addHeader("Content-Type", "image/png");
    resp.getOutputStream().write(pngData);
    

    If you want to try generating the image data without a library, the BMP format might be easiest. You can use the Images service to convert this to PNG.

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

Sidebar

Related Questions

I'm creating a web application on Google AppEngine where I want the user to
What exception does com.google.appengine.api.datastore.Transaction.commit() throw when there is a concurrency problem? I want to
I want to crop an image using images library of google app engine. The
So I've got this server application running on Google AppEngine that I want to
I want to make simple web page with google appengine with gwt in eclipse.
I am using the python version of Google AppEngine. I want to be able
I am working on google appengine to create a tool for comparing image similarity.
Google App Engine - When I want to store a byte array as one
I want to develop my project on Google App Engine with Struts2. For the
I'm using Google App Engine python. I want to know what browser the user

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.