Questions tagged [image-compression]

The objective of image compression is to reduce irrelevance and redundancy of the image data in order to be able to store or transmit data in an efficient form. Image compression may be lossy or lossless.

816 questions
-1
votes
1 answer

PHP: scan directory, compress & overwrite images - script fails on production, produces just warnings on local

I have this code that is run as a cron task. Basically what it does (should) is go through a folder, find images that are larger than the specified size, rezise them and overwrite them. When testing it locally (using same 1300+ images) it works. If…
kopz
  • 738
  • 11
  • 20
-1
votes
1 answer

New image resolution problem in Blogger site

I'm having a problem with image resolution when uploaded to my blogger site: its resolution is decreased dramatically, looking blurry and compressed. This is the original image: and this is what it looks like after upload: The available image…
Javier Sandoval
  • 507
  • 3
  • 18
-1
votes
1 answer

Compress image without saving it -- in Java

Is there a way, in Java, to compute what the size of a compressed image will be w/o saving the image? (This will be used to determine the quality necessary to compress an image to a specific size.) Something like this, but in Java instead of C#, and…
Scott Hunter
  • 48,888
  • 12
  • 60
  • 101
-1
votes
1 answer

Convert UIImage into Base64 String with less than 100 Characters. Swift 4.2 | iOS

I want to encode a UIImage object into Base64 String. Generally, I'm a getting quite a large string and the process is taking a long execustion time as well. func convertImageToBase64String () -> String { guard let imageData: Data =…
Peeyush karnwal
  • 622
  • 7
  • 24
-1
votes
2 answers

How are quantized DCT coeffiecients serialised in JPEG?

I've read in dozens of articles, scientific papers, and toy implementations that the steps in JPEG compression are roughly as follows Take 8x8 DCT Divide by quantization matrix Round to integers Run-length & Hufmann And then the inverse is pretty…
Pepijn
  • 4,145
  • 5
  • 36
  • 64
-1
votes
1 answer

Compressing PDF without X-Object

I have several methods to manipulate my PDF files, such as convert them to .jpg images to make the compression. Now, I have a pdf file that doesn't have an X-Object, ie, I cannot turn it into jpg to compress them. Then i decided to grab the entire…
-1
votes
2 answers

C# how to compress .png without transparent background lost?

I use the following codes to compress an image file to jpg: // _rawBitmap = a Bitmap object ImageCodecInfo encoder = GetEncoder(ImageFormat.Jpeg); System.Drawing.Imaging.Encoder myEncoder = System.Drawing.Imaging.Encoder.Quality; EncoderParameters…
Oh My Dog
  • 781
  • 13
  • 32
-1
votes
1 answer

Unable to pass Base64 String with object using Retrofit

I am encoding image using following method` Bitmap bm = BitmapFactory.decodeFile(mCurrentPhotoPath); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bm.compress(Bitmap.CompressFormat.JPEG, 100, baos); //bm is the bitmap object …
hasan
  • 57
  • 1
  • 13
-1
votes
1 answer

JPEG2000 : Can number of tiles in X direction be zero?

According to JPEG2000 specs, Number of tiles in X and Y directions is calculated by following formula: numXtiles =  (Xsiz − XTOsiz)/ XTsiz & numYtiles =  (Ysiz − YTOsiz)/ YTsiz But it is not mentioned about the range of numXtiles or…
-1
votes
1 answer

Size of compressed textures in vulkan

how to use compressed textures in Vulkan? Is it the same way as non-compressed textures with formats from one of compressed formats? If yes, when we copy data from memory to GPU, how do we calculate the size of image data? Lets say we have format as…
debonair
  • 2,505
  • 4
  • 33
  • 73
-1
votes
2 answers

Calculate / Estimate the compressed file size without performing compression

I want to calculate / estimate what would be the file size of image (.jpg) after doing compression with Encoder.Quality value. Here I should not perform any compression before estimating, Is there any formula to do it? Is there any rough estimate. I…
Naveen Bathina
  • 404
  • 1
  • 6
  • 25
-1
votes
1 answer

How do we perform image compression in ASP.NET web-forms

our portal maintains stores huge set of images in 4 folders Projects Campaigns Films Standard-images We store the image path in a table and it's source in the aforementioned folders. What is the best practice for image compression?
Arun Kumar
  • 47
  • 1
  • 2
  • 11
-1
votes
1 answer

Compressing Google Maps Tiles

I'm looking for a way to compress the tiles from a Google Map (which I've already done) and then somehow replace the old tiles with the compressed tiles. This is how a tile looks in the code, for example:
-1
votes
2 answers

Optimize storage of large number of .PNG files

I have milions of .PNG images which all have same colors. I would like to use this knowledge in order to save some space in following manner: Force all files to use same palette and store only IHDR and IDAT section and use same PLTE for all files. I…
watbywbarif
  • 6,487
  • 8
  • 50
  • 64
-1
votes
2 answers

Multiple photo compression

I need decrease photo size while photo size is not under 1MB. So how I do this. I have activity where I can take photo when is photo taken then in activity result I start AsyncTask which do compression of my photo. Compression works good and photo…
pavol.franek
  • 1,396
  • 3
  • 19
  • 42