Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#2188 closed defect (fixed)

[raster] Issue with ST_Resize percent doesn't work always for non-georeferenced affects both in db and out db

Reported by: robe Owned by: Bborie Park
Priority: critical Milestone: PostGIS 2.1.0
Component: raster Version: master
Keywords: Cc:


Okay I have more pictures but these are property inspection ones in jpeg. For this set ST_Resize using percentage doesn't seem to work:


for any of them regardless of if I have outdb or indb.

However if I do pixel size like


That works fine.

I'm not sure if it's related to: #2182 and possibly a windows 2008 specific issue.

I'll check on my Windows 2003 64-bit server to verify it happens on that as well:

Any rate:

raster2pgsql -F -Y -R C:/photos/*.jpg inspection_pics_outdb | psql
raster2pgsql -F -Y C:/photos/*.jpg inspection_pics_local | psql

SELECT version() || ' ' || postgis_full_version();

-- outputs --
PostgreSQL 9.2.2, compiled by Visual C++ build 1600, 64-bit POSTGIS="2.1.0SVN r11044" GEOS="3.4.0dev-CAPI-1.8.0 r0" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY (topology procs from "2.1.0SVN r10987" need upgrade) RASTER

and this is on a Windows 2008 R2 64-bit VM 
 -- works --
SELECT ST_Resize(rast,200,200) 
FROM inspection_pics_local  
WHERE filename='PHOTO_1_20080101_121112.jpg'
 -- returns a black image --
SELECT ST_Resize(rast,0.5,0.5) 
FROM inspection_pics_local  
WHERE filename='PHOTO_1_20080101_121112.jpg'

I'm attaching one of the problem pics this one is public record inspections so no issue attaching pic.

Attachments (1)

PHOTO_1_20080101_121112.jpg (98.7 KB ) - added by robe 11 years ago.

Download all attachments as: .zip

Change History (5)

by robe, 11 years ago

Attachment: PHOTO_1_20080101_121112.jpg added

comment:1 by robe, 11 years ago

Component: postgisraster
Owner: changed from pramsey to Bborie Park

comment:2 by Bborie Park, 11 years ago

Status: newassigned

Failing on Linux as well. Both ST_Resize(rast, 0.5, 0.5) and ST_Resize(rast, 512, 384) fail.

comment:3 by Bborie Park, 11 years ago

Resolution: fixed
Status: assignedclosed

Fixed for -trunk in r11057. Fixed for -2.0 in r11058.

comment:4 by robe, 11 years ago

great works for me too.

Note: See TracTickets for help on using tickets.