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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:09:35+00:00 2026-06-14T01:09:35+00:00

I have spent the last couple hours scouring the Internet for a solution to

  • 0

I have spent the last couple hours scouring the Internet for a solution to my problem, and while I have seen some “answers” on other forums, none of them suit my needs…

I have a binary file, which I am creating in Matlab using fwrite (although, if someone has a better way to generate a binary file in Matlab, I’m open to suggestions). Back to my problem – I have this binary file, and I want to convert it to a jpeg. Nevermind where the binary data comes from, I just want to generate a jpeg image of the binary data.

Is this even possible? – Like I said, lots of “solutions” out there to similar problems, but none match up to my needs.

I can write code in C++, if necessary, but for simplicity, I’d like to stay in Matlab.

Any help will be appreciated.

  • 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-14T01:09:36+00:00Added an answer on June 14, 2026 at 1:09 am

    EDIT:

    from binary to array:

    fid = fopen('yourfilename.bin');
    
    % read the entire file as characters
    % transpose so that F is a row vector
    B = fread(fid, '*char')'
    
    fclose(fid);
    

    Reshape to array according to image dimensions

    C=reshape(B,512,512); % or whatever dimension you have 
    

    Upon having the array of strings just use:

    D=int32(str2num(C));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have spent the last couple of hours battling to write some javascript and
I have spent last couple of hours searching for answers here but nothing seems
I have spent the last couple of hours looking through other questions on this
I have spent the last several hours scouring the internet looking for examples and
Urgh, I have spent the last couple of hours on this now. I normally
I have spent the last couple of hours trying to get my sessions to
I have spent the last couple of days trying to find the solution to
I have spent the last couple of days to use Core Plot for the
I have spent hours in this problem and my fellows couldn't help me out.
I have spent the last 4 hours trying to get my iPad to run

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.