Stegnography Tool - StegDetect (error: Quantization table 0x00 was not defined) - jpeg

I meet an error while using stegdetect program to detect if my a.jpg file has content hidden inside. The error is "error: Quantization table 0x00 was not defined". Can anybody explain to me what this error is about? Please help me with this error. Thanks in advance.
Stegbreak command:

Your JPEG file is corrupted. stegbreak utility clearly states what before marker 0xDB (Define quantization table) you have extra 67 bytes.
I think what before definition of first (0x00) quantization table there was a comment block which is malformed (has more data than was indicated in block header).
You can try to use JPEGsnoop tool to analyze file and see what is exactly gong wrong.
Or you can use jpegtran tool from libjpeg to losslessy reencode image and fix its headers (but you may loose all metadata which are not part of image itself).

Related

How do I fix an SDL Mixer "Unsupported block alignment" error?

I'm using SDL2 and the SDL mixer library to attempt to play a WAV file. After calling the Mix_LoadWAV_RW function, I get the following error string: "Unsupported block alignment" In case it matters, I'll note that I got the *SDL_RWops by calling SDL_RWFromMem on a WAV file I have embedded into my source code as an array of bytes. That is, the first several bytes are the WAV header containing the text "RIFF: and "WAVE".
I'm guessing this means I need to re-encode my WAV file to a sub-format with a supported block alignment, but that is mostly a guess. Given I go with that guess, it seems like I would need to know what block alignments are supported. I'm unable to find any relevant info in the docs about which alignments are supported.
I've also tried searching this github mirror of the source code for SDL mixer for "Unsupported block alignment" but I didn't get any results. Does that mean that the error is coming from some dependency of SDL Mixer or something?
Does anyone know more about this error, where I can find more information on this error, or even a reasonable guess as to how I should change my WAV file to work here?
For the record, I ended up just re-encoding the WAV file with default settings in Audacity, and it seems to have worked after that.

GraphicsMagick unable to process Unicode filenames

I have found that GraphicsMagick is unable to process my files named in Chinese. I did the same test on ImageMagick but IM worked as expected.
I thought this might be a bug so I filed a bug report here: https://sourceforge.net/p/graphicsmagick/bugs/384/
Anyway, this is how to reproduce my situation:
Platform: Win10
Version: GraphicsMagick 1.3.20
Code: gm -identify 獅藝學會.jpg
This is the returned text from Command Prompt:
>gm -identify 獅藝學會.jpg
gm identify: Unable to open file (????.jpg) [Invalid argument].
gm identify: Request did not return an image.
Using IM worked:
identify 獅藝學會.jpg
ç?.è-?å-,æoƒ.jpg JPEG 3264x2448 3264x2448+0+0 8-bit sRGB 2.691MB 0.016u 0:00.004
Although the text returned is scrambled, but converting the file to a .png still maintained the same filename apart from the different extensions of course.
What happened
I found this problem by using the gm node.js library batch processing my images, the source of the call is made from a UTF-8 webpage, so I assume the filename is passed as Unicode encoding.
I found no documentation related to this problem, although the documentation states that there was a -encoding option, it cannot be sent as parameter on Windows as it does not recognize it and I cannot find relevant solutions on Google.
Please help, is there any easy way around this problem, while keeping the exact filename?
In case someone uses the C api.
(You can only give (char *)-type filenames. And UTF-8 encoding does not work, if using GraphicsMagick on Windows.)
You could do the following:
Open the file for input (or output) yourself (use fopen(), _wfopen() etc).
Then set the filehandle within the ImageInfo structure for reading and Image structure for writing respectively (instead of setting the filename).
To have GraphicsMagick generate the right output file format, set magick within the Image structure.
f.e.:
//Reading
imageInfo->file=_wfopen(input_filename,L"rb"); //ImageInfo *imageInfo;
ReadImage(imageInfo,exception);
//Writing
image->file=_wfopen(output_filename,L"wb"); //Image *image;
strcpy(image->magick,"PNG");
WriteImage(imageInfo,image);
GraphicsMagick automatically closes the file after writing/reading.
I have the same problem using GM in C++. UTF-8 filenames are not supported under Windows (not even in the API!).
My workaround is to get the short path name (8.3), you can do that both using command line and Win32. However this doesn't work 100% - and if you want to save a file you have to create an empty one first to be able to get the short name.

Creating KML superoverlays with gdal2tiles

I am trying to use gdal2tiles to batch-create a bunch of KML superoverlays from a set big geotiff files; problem is that the gdal2tiles output seems to be stripped of its lowest-values point (i.e. the blue ones in the first image below)
This is an example of a superoverlay created directly from Google Earth Pro (using its built-in function):
This is the corresponding output of gdal2tiles, which I generated following the instructions explained in this KML guide; particularly, this is what I did:
gdalwarp -of VRT -t_srs EPSG:4326 input.tif output.vrt
gdal2tiles.py -p geodetic -k output.vrt outputdir/
Does anyone know why this happens? Any suggestions on how to avoid it?
Thanks

Read DICOM images

i am trying to read dicom images without using imageviewer and i came across VtkGdmReader.. when i am trying to execute it, its giving me an error:
code => vtkGdmReader example
error C2039: 'SetInput' : is not a member of 'vtkTexture'
error C2039: 'SetInput' : is not a member of 'vtkPolyDataMapper'
please can any one tell me why am i facing this problem, is this error related to vtk version ? if so then how can i go about it ?
please help me resolving the problem..
As said in the comments, this error is related to the VTK version. SetInput() was removed in VTK 6.
You can either work in VTK 5 or update the code. If you decide to update it, this error gets fixed by replacing SetInput() with either SetInputData() or SetInputConnection() with a few modifications. You should use SetInputConnection() if you want the filters to go through the pipeline.
As an example of fixing the errors you mentioned, you should replace the following lines in the code you provided:
VTKtexture->SetInput(ima); and
VTKplaneMapper->SetInput(VTKplane->GetOutput());
to:
VTKtexture->SetInputConnection(reader->GetOutputPort()); and
VTKplaneMapper->SetInputConnection(VTKplane->GetOutputPort());
In the second modification (VTKplaneMapper), note that we just changed GetOutput() to GetOutputPort(), while in the first one (VTKtexture) we completely changed the argument passed to SetInputConnection(). That happens because data objects (such as ima) no longer have dependency on pipeline objects (such as algorithms and executives). In this case, we give the algorithm that generated that data object as the argument - if you look for it, you can see the line vtkImageData* ima = reader->GetOutput();, you just have to replace GetOutput() by GetOutputPort() as we did in the second modification.
I recommend looking into the VTK Wiki's VTK 6 Migration pages (and guide) for more information on this error and other errors that you might run into.

Converting COLLADA to POD

Does anybody know what this error mean and how to fix it?
"No supported geometry data found for mesh "SketchUp"
I encountered this when using tool Collada2POD.
I read that article.
Can anybody tell me what the "lines" refer to in the sentence below.
"I ran into that problem, turns out the collada2Pod converter only supports meshes, but sketchUp can generate lines as well as meshes. I had to write my own converter using the OSS Assimp lib."
"i solved this problem btw, i had a single line which wasn't connected to anything inside my model. Just remove lonely lines and then you should be good to go."

Resources